Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / v8 / BUILD.gn
index efa4b71..315c203 100644 (file)
@@ -25,7 +25,7 @@ v8_random_seed = "314159265"
 # Configurations
 #
 config("internal_config") {
-  visibility = ":*"  # Only targets in this file can depend on this.
+  visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
   include_dirs = [ "." ]
 
@@ -38,7 +38,7 @@ config("internal_config") {
 }
 
 config("internal_config_base") {
-  visibility = ":*"  # Only targets in this file can depend on this.
+  visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
   include_dirs = [ "." ]
 }
@@ -56,7 +56,7 @@ config("external_config") {
 }
 
 config("features") {
-  visibility = ":*"  # Only targets in this file can depend on this.
+  visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
   defines = []
 
@@ -118,7 +118,7 @@ config("features") {
 }
 
 config("toolchain") {
-  visibility = ":*"  # Only targets in this file can depend on this.
+  visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
   defines = []
   cflags = []
@@ -167,7 +167,7 @@ config("toolchain") {
 #
 
 action("js2c") {
-  visibility = ":*"  # Only targets in this file can depend on this.
+  visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
   script = "tools/js2c.py"
 
@@ -184,24 +184,25 @@ action("js2c") {
     "src/uri.js",
     "third_party/fdlibm/fdlibm.js",
     "src/math.js",
-    "src/messages.js",
     "src/apinatives.js",
-    "src/debug-debugger.js",
-    "src/mirror-debugger.js",
-    "src/liveedit-debugger.js",
     "src/date.js",
-    "src/json.js",
     "src/regexp.js",
     "src/arraybuffer.js",
     "src/typedarray.js",
+    "src/generator.js",
+    "src/object-observe.js",
     "src/collection.js",
+    "src/weak-collection.js",
     "src/collection-iterator.js",
-    "src/weak_collection.js",
     "src/promise.js",
-    "src/object-observe.js",
-    "src/macros.py",
+    "src/messages.js",
+    "src/json.js",
     "src/array-iterator.js",
     "src/string-iterator.js",
+    "src/debug-debugger.js",
+    "src/mirror-debugger.js",
+    "src/liveedit-debugger.js",
+    "src/macros.py",
   ]
 
   outputs = [
@@ -228,7 +229,7 @@ action("js2c") {
 }
 
 action("js2c_experimental") {
-  visibility = ":*"  # Only targets in this file can depend on this.
+  visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
   script = "tools/js2c.py"
 
@@ -242,6 +243,7 @@ action("js2c_experimental") {
     "src/generator.js",
     "src/harmony-string.js",
     "src/harmony-array.js",
+    "src/harmony-classes.js",
   ]
 
   outputs = [
@@ -265,7 +267,7 @@ action("js2c_experimental") {
 
 if (v8_use_external_startup_data) {
   action("natives_blob") {
-    visibility = ":*"  # Only targets in this file can depend on this.
+    visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
     deps = [
       ":js2c",
@@ -288,7 +290,7 @@ if (v8_use_external_startup_data) {
 }
 
 action("postmortem-metadata") {
-  visibility = ":*"  # Only targets in this file can depend on this.
+  visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
   script = "tools/gen-postmortem-metadata.py"
 
@@ -307,7 +309,7 @@ action("postmortem-metadata") {
 }
 
 action("run_mksnapshot") {
-  visibility = ":*"  # Only targets in this file can depend on this.
+  visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
   deps = [ ":mksnapshot($host_toolchain)" ]
 
@@ -345,7 +347,7 @@ action("run_mksnapshot") {
 #
 
 source_set("v8_nosnapshot") {
-  visibility = ":*"  # Only targets in this file can depend on this.
+  visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
   deps = [
     ":js2c",
@@ -366,7 +368,7 @@ source_set("v8_nosnapshot") {
 }
 
 source_set("v8_snapshot") {
-  visibility = ":*"  # Only targets in this file can depend on this.
+  visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
   deps = [
     ":js2c",
@@ -389,7 +391,7 @@ source_set("v8_snapshot") {
 
 if (v8_use_external_startup_data) {
   source_set("v8_external_snapshot") {
-    visibility = ":*"  # Only targets in this file can depend on this.
+    visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
     deps = [
       ":js2c",
@@ -411,7 +413,7 @@ if (v8_use_external_startup_data) {
 }
 
 source_set("v8_base") {
-  visibility = ":*"  # Only targets in this file can depend on this.
+  visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
   sources = [
     "src/accessors.cc",
@@ -434,6 +436,10 @@ source_set("v8_base") {
     "src/ast-value-factory.h",
     "src/ast.cc",
     "src/ast.h",
+    "src/background-parsing-task.cc",
+    "src/background-parsing-task.h",
+    "src/bailout-reason.cc",
+    "src/bailout-reason.h",
     "src/bignum-dtoa.cc",
     "src/bignum-dtoa.h",
     "src/bignum.cc",
@@ -451,6 +457,8 @@ source_set("v8_base") {
     "src/checks.h",
     "src/circular-queue-inl.h",
     "src/circular-queue.h",
+    "src/code-factory.cc",
+    "src/code-factory.h",
     "src/code-stubs.cc",
     "src/code-stubs.h",
     "src/code-stubs-hydrogen.cc",
@@ -459,12 +467,17 @@ source_set("v8_base") {
     "src/codegen.h",
     "src/compilation-cache.cc",
     "src/compilation-cache.h",
+    "src/compiler/access-builder.cc",
+    "src/compiler/access-builder.h",
     "src/compiler/ast-graph-builder.cc",
     "src/compiler/ast-graph-builder.h",
+    "src/compiler/change-lowering.cc",
+    "src/compiler/change-lowering.h",
     "src/compiler/code-generator-impl.h",
     "src/compiler/code-generator.cc",
     "src/compiler/code-generator.h",
     "src/compiler/common-node-cache.h",
+    "src/compiler/common-operator.cc",
     "src/compiler/common-operator.h",
     "src/compiler/control-builders.cc",
     "src/compiler/control-builders.h",
@@ -493,24 +506,28 @@ source_set("v8_base") {
     "src/compiler/instruction-selector.h",
     "src/compiler/instruction.cc",
     "src/compiler/instruction.h",
+    "src/compiler/js-builtin-reducer.cc",
+    "src/compiler/js-builtin-reducer.h",
     "src/compiler/js-context-specialization.cc",
     "src/compiler/js-context-specialization.h",
     "src/compiler/js-generic-lowering.cc",
     "src/compiler/js-generic-lowering.h",
     "src/compiler/js-graph.cc",
     "src/compiler/js-graph.h",
+    "src/compiler/js-inlining.cc",
+    "src/compiler/js-inlining.h",
     "src/compiler/js-operator.h",
     "src/compiler/js-typed-lowering.cc",
     "src/compiler/js-typed-lowering.h",
     "src/compiler/linkage-impl.h",
     "src/compiler/linkage.cc",
     "src/compiler/linkage.h",
-    "src/compiler/lowering-builder.cc",
-    "src/compiler/lowering-builder.h",
-    "src/compiler/machine-node-factory.h",
     "src/compiler/machine-operator-reducer.cc",
     "src/compiler/machine-operator-reducer.h",
+    "src/compiler/machine-operator.cc",
     "src/compiler/machine-operator.h",
+    "src/compiler/machine-type.cc",
+    "src/compiler/machine-type.h",
     "src/compiler/node-aux-data-inl.h",
     "src/compiler/node-aux-data.h",
     "src/compiler/node-cache.cc",
@@ -523,6 +540,7 @@ source_set("v8_base") {
     "src/compiler/opcodes.h",
     "src/compiler/operator-properties-inl.h",
     "src/compiler/operator-properties.h",
+    "src/compiler/operator.cc",
     "src/compiler/operator.h",
     "src/compiler/phi-reducer.h",
     "src/compiler/pipeline.cc",
@@ -538,14 +556,16 @@ source_set("v8_base") {
     "src/compiler/scheduler.h",
     "src/compiler/simplified-lowering.cc",
     "src/compiler/simplified-lowering.h",
-    "src/compiler/simplified-node-factory.h",
+    "src/compiler/simplified-operator-reducer.cc",
+    "src/compiler/simplified-operator-reducer.h",
+    "src/compiler/simplified-operator.cc",
     "src/compiler/simplified-operator.h",
     "src/compiler/source-position.cc",
     "src/compiler/source-position.h",
-    "src/compiler/structured-machine-assembler.cc",
-    "src/compiler/structured-machine-assembler.h",
     "src/compiler/typer.cc",
     "src/compiler/typer.h",
+    "src/compiler/value-numbering-reducer.cc",
+    "src/compiler/value-numbering-reducer.h",
     "src/compiler/verifier.cc",
     "src/compiler/verifier.h",
     "src/compiler.cc",
@@ -601,7 +621,6 @@ source_set("v8_base") {
     "src/fast-dtoa.cc",
     "src/fast-dtoa.h",
     "src/feedback-slots.h",
-    "src/field-index.cc",
     "src/field-index.h",
     "src/field-index-inl.h",
     "src/fixed-dtoa.cc",
@@ -630,6 +649,8 @@ source_set("v8_base") {
     "src/heap-snapshot-generator-inl.h",
     "src/heap-snapshot-generator.cc",
     "src/heap-snapshot-generator.h",
+    "src/heap/gc-idle-time-handler.cc",
+    "src/heap/gc-idle-time-handler.h",
     "src/heap/gc-tracer.cc",
     "src/heap/gc-tracer.h",
     "src/heap/heap-inl.h",
@@ -707,11 +728,25 @@ source_set("v8_base") {
     "src/i18n.h",
     "src/icu_util.cc",
     "src/icu_util.h",
-    "src/ic-inl.h",
-    "src/ic.cc",
-    "src/ic.h",
+    "src/ic/access-compiler.cc",
+    "src/ic/access-compiler.h",
+    "src/ic/call-optimization.cc",
+    "src/ic/call-optimization.h",
+    "src/ic/handler-compiler.cc",
+    "src/ic/handler-compiler.h",
+    "src/ic/ic-inl.h",
+    "src/ic/ic-state.cc",
+    "src/ic/ic-state.h",
+    "src/ic/ic.cc",
+    "src/ic/ic.h",
+    "src/ic/ic-compiler.cc",
+    "src/ic/ic-compiler.h",
+    "src/ic/stub-cache.cc",
+    "src/ic/stub-cache.h",
     "src/interface.cc",
     "src/interface.h",
+    "src/interface-descriptors.cc",
+    "src/interface-descriptors.h",
     "src/interpreter-irregexp.cc",
     "src/interpreter-irregexp.h",
     "src/isolate.cc",
@@ -812,13 +847,14 @@ source_set("v8_base") {
     "src/string-stream.h",
     "src/strtod.cc",
     "src/strtod.h",
-    "src/stub-cache.cc",
-    "src/stub-cache.h",
     "src/token.cc",
     "src/token.h",
     "src/transitions-inl.h",
     "src/transitions.cc",
     "src/transitions.h",
+    "src/type-feedback-vector-inl.h",
+    "src/type-feedback-vector.cc",
+    "src/type-feedback-vector.h",
     "src/type-info.cc",
     "src/type-info.h",
     "src/types-inl.h",
@@ -871,7 +907,7 @@ source_set("v8_base") {
       "src/ia32/frames-ia32.cc",
       "src/ia32/frames-ia32.h",
       "src/ia32/full-codegen-ia32.cc",
-      "src/ia32/ic-ia32.cc",
+      "src/ia32/interface-descriptors-ia32.cc",
       "src/ia32/lithium-codegen-ia32.cc",
       "src/ia32/lithium-codegen-ia32.h",
       "src/ia32/lithium-gap-resolver-ia32.cc",
@@ -882,11 +918,13 @@ source_set("v8_base") {
       "src/ia32/macro-assembler-ia32.h",
       "src/ia32/regexp-macro-assembler-ia32.cc",
       "src/ia32/regexp-macro-assembler-ia32.h",
-      "src/ia32/stub-cache-ia32.cc",
       "src/compiler/ia32/code-generator-ia32.cc",
       "src/compiler/ia32/instruction-codes-ia32.h",
       "src/compiler/ia32/instruction-selector-ia32.cc",
       "src/compiler/ia32/linkage-ia32.cc",
+      "src/ic/ia32/ic-ia32.cc",
+      "src/ic/ia32/ic-compiler-ia32.cc",
+      "src/ic/ia32/stub-cache-ia32.cc",
     ]
   } else if (v8_target_arch == "x64") {
     sources += [
@@ -905,7 +943,7 @@ source_set("v8_base") {
       "src/x64/frames-x64.cc",
       "src/x64/frames-x64.h",
       "src/x64/full-codegen-x64.cc",
-      "src/x64/ic-x64.cc",
+      "src/x64/interface-descriptors-x64.cc",
       "src/x64/lithium-codegen-x64.cc",
       "src/x64/lithium-codegen-x64.h",
       "src/x64/lithium-gap-resolver-x64.cc",
@@ -916,11 +954,15 @@ source_set("v8_base") {
       "src/x64/macro-assembler-x64.h",
       "src/x64/regexp-macro-assembler-x64.cc",
       "src/x64/regexp-macro-assembler-x64.h",
-      "src/x64/stub-cache-x64.cc",
       "src/compiler/x64/code-generator-x64.cc",
       "src/compiler/x64/instruction-codes-x64.h",
       "src/compiler/x64/instruction-selector-x64.cc",
       "src/compiler/x64/linkage-x64.cc",
+      "src/ic/x64/access-compiler-x64.cc",
+      "src/ic/x64/handler-compiler-x64.cc",
+      "src/ic/x64/ic-x64.cc",
+      "src/ic/x64/ic-compiler-x64.cc",
+      "src/ic/x64/stub-cache-x64.cc",
     ]
   } else if (v8_target_arch == "arm") {
     sources += [
@@ -941,7 +983,8 @@ source_set("v8_base") {
       "src/arm/frames-arm.cc",
       "src/arm/frames-arm.h",
       "src/arm/full-codegen-arm.cc",
-      "src/arm/ic-arm.cc",
+      "src/arm/interface-descriptors-arm.cc",
+      "src/arm/interface-descriptors-arm.h",
       "src/arm/lithium-arm.cc",
       "src/arm/lithium-arm.h",
       "src/arm/lithium-codegen-arm.cc",
@@ -953,11 +996,15 @@ source_set("v8_base") {
       "src/arm/regexp-macro-assembler-arm.cc",
       "src/arm/regexp-macro-assembler-arm.h",
       "src/arm/simulator-arm.cc",
-      "src/arm/stub-cache-arm.cc",
       "src/compiler/arm/code-generator-arm.cc",
       "src/compiler/arm/instruction-codes-arm.h",
       "src/compiler/arm/instruction-selector-arm.cc",
       "src/compiler/arm/linkage-arm.cc",
+      "src/ic/arm/access-compiler-arm.cc",
+      "src/ic/arm/handler-compiler-arm.cc",
+      "src/ic/arm/ic-arm.cc",
+      "src/ic/arm/ic-compiler-arm.cc",
+      "src/ic/arm/stub-cache-arm.cc",
     ]
   } else if (v8_target_arch == "arm64") {
     sources += [
@@ -981,11 +1028,12 @@ source_set("v8_base") {
       "src/arm64/frames-arm64.cc",
       "src/arm64/frames-arm64.h",
       "src/arm64/full-codegen-arm64.cc",
-      "src/arm64/ic-arm64.cc",
       "src/arm64/instructions-arm64.cc",
       "src/arm64/instructions-arm64.h",
       "src/arm64/instrument-arm64.cc",
       "src/arm64/instrument-arm64.h",
+      "src/arm64/interface-descriptors-arm64.cc",
+      "src/arm64/interface-descriptors-arm64.h",
       "src/arm64/lithium-arm64.cc",
       "src/arm64/lithium-arm64.h",
       "src/arm64/lithium-codegen-arm64.cc",
@@ -999,13 +1047,17 @@ source_set("v8_base") {
       "src/arm64/regexp-macro-assembler-arm64.h",
       "src/arm64/simulator-arm64.cc",
       "src/arm64/simulator-arm64.h",
-      "src/arm64/stub-cache-arm64.cc",
       "src/arm64/utils-arm64.cc",
       "src/arm64/utils-arm64.h",
       "src/compiler/arm64/code-generator-arm64.cc",
       "src/compiler/arm64/instruction-codes-arm64.h",
       "src/compiler/arm64/instruction-selector-arm64.cc",
       "src/compiler/arm64/linkage-arm64.cc",
+      "src/ic/arm64/access-compiler-arm64.cc",
+      "src/ic/arm64/handler-compiler-arm64.cc",
+      "src/ic/arm64/ic-arm64.cc",
+      "src/ic/arm64/ic-compiler-arm64.cc",
+      "src/ic/arm64/stub-cache-arm64.cc",
     ]
   } else if (v8_target_arch == "mipsel") {
     sources += [
@@ -1026,7 +1078,7 @@ source_set("v8_base") {
       "src/mips/frames-mips.cc",
       "src/mips/frames-mips.h",
       "src/mips/full-codegen-mips.cc",
-      "src/mips/ic-mips.cc",
+      "src/mips/interface-descriptors-mips.cc",
       "src/mips/lithium-codegen-mips.cc",
       "src/mips/lithium-codegen-mips.h",
       "src/mips/lithium-gap-resolver-mips.cc",
@@ -1038,7 +1090,48 @@ source_set("v8_base") {
       "src/mips/regexp-macro-assembler-mips.cc",
       "src/mips/regexp-macro-assembler-mips.h",
       "src/mips/simulator-mips.cc",
-      "src/mips/stub-cache-mips.cc",
+      "src/ic/mips/access-compiler-mips.cc",
+      "src/ic/mips/handler-compiler-mips.cc",
+      "src/ic/mips/ic-mips.cc",
+      "src/ic/mips/ic-compiler-mips.cc",
+      "src/ic/mips/stub-cache-mips.cc",
+    ]
+  } else if (v8_target_arch == "mips64el") {
+    sources += [
+      "src/mips64/assembler-mips64.cc",
+      "src/mips64/assembler-mips64.h",
+      "src/mips64/assembler-mips64-inl.h",
+      "src/mips64/builtins-mips64.cc",
+      "src/mips64/codegen-mips64.cc",
+      "src/mips64/codegen-mips64.h",
+      "src/mips64/code-stubs-mips64.cc",
+      "src/mips64/code-stubs-mips64.h",
+      "src/mips64/constants-mips64.cc",
+      "src/mips64/constants-mips64.h",
+      "src/mips64/cpu-mips64.cc",
+      "src/mips64/debug-mips64.cc",
+      "src/mips64/deoptimizer-mips64.cc",
+      "src/mips64/disasm-mips64.cc",
+      "src/mips64/frames-mips64.cc",
+      "src/mips64/frames-mips64.h",
+      "src/mips64/full-codegen-mips64.cc",
+      "src/mips64/interface-descriptors-mips64.cc",
+      "src/mips64/lithium-codegen-mips64.cc",
+      "src/mips64/lithium-codegen-mips64.h",
+      "src/mips64/lithium-gap-resolver-mips64.cc",
+      "src/mips64/lithium-gap-resolver-mips64.h",
+      "src/mips64/lithium-mips64.cc",
+      "src/mips64/lithium-mips64.h",
+      "src/mips64/macro-assembler-mips64.cc",
+      "src/mips64/macro-assembler-mips64.h",
+      "src/mips64/regexp-macro-assembler-mips64.cc",
+      "src/mips64/regexp-macro-assembler-mips64.h",
+      "src/mips64/simulator-mips64.cc",
+      "src/ic/mips64/access-compiler-mips64.cc",
+      "src/ic/mips64/handler-compiler-mips64.cc",
+      "src/ic/mips64/ic-mips64.cc",
+      "src/ic/mips64/ic-compiler-mips64.cc",
+      "src/ic/mips64/stub-cache-mips64.cc",
     ]
   }
 
@@ -1046,9 +1139,18 @@ source_set("v8_base") {
   configs += [ "//build/config/compiler:no_chromium_code" ]
   configs += [ ":internal_config", ":features", ":toolchain" ]
 
+  if (!is_debug) {
+    configs -= [ "//build/config/compiler:optimize" ]
+    configs += [ "//build/config/compiler:optimize_max" ]
+  }
+
   defines = []
   deps = [ ":v8_libbase" ]
 
+  if (is_win) {
+    # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+    cflags = [ "/wd4267" ]
+  }
   if (is_linux) {
     if (v8_compress_startup_data == "bz2") {
       libs += [ "bz2" ]
@@ -1076,7 +1178,7 @@ source_set("v8_base") {
 }
 
 source_set("v8_libbase") {
-  visibility = ":*"  # Only targets in this file can depend on this.
+  visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
   sources = [
     "src/base/atomicops.h",
@@ -1089,9 +1191,14 @@ source_set("v8_libbase") {
     "src/base/atomicops_internals_x86_gcc.cc",
     "src/base/atomicops_internals_x86_gcc.h",
     "src/base/atomicops_internals_x86_msvc.h",
+    "src/base/bits.cc",
+    "src/base/bits.h",
     "src/base/build_config.h",
     "src/base/cpu.cc",
     "src/base/cpu.h",
+    "src/base/division-by-constant.cc",
+    "src/base/division-by-constant.h",
+    "src/base/flags.h",
     "src/base/lazy-instance.h",
     "src/base/logging.cc",
     "src/base/logging.h",
@@ -1112,6 +1219,8 @@ source_set("v8_libbase") {
     "src/base/safe_conversions_impl.h",
     "src/base/safe_math.h",
     "src/base/safe_math_impl.h",
+    "src/base/sys-info.cc",
+    "src/base/sys-info.h",
     "src/base/utils/random-number-generator.cc",
     "src/base/utils/random-number-generator.h",
   ]
@@ -1120,6 +1229,11 @@ source_set("v8_libbase") {
   configs += [ "//build/config/compiler:no_chromium_code" ]
   configs += [ ":internal_config_base", ":features", ":toolchain" ]
 
+  if (!is_debug) {
+    configs -= [ "//build/config/compiler:optimize" ]
+    configs += [ "//build/config/compiler:optimize_max" ]
+  }
+
   defines = []
 
   if (is_posix) {
@@ -1183,6 +1297,11 @@ source_set("v8_libplatform") {
   configs += [ "//build/config/compiler:no_chromium_code" ]
   configs += [ ":internal_config_base", ":features", ":toolchain" ]
 
+  if (!is_debug) {
+    configs -= [ "//build/config/compiler:optimize" ]
+    configs += [ "//build/config/compiler:optimize_max" ]
+  }
+
   deps = [
     ":v8_libbase",
   ]
@@ -1194,7 +1313,7 @@ source_set("v8_libplatform") {
 
 if (current_toolchain == host_toolchain) {
   executable("mksnapshot") {
-    visibility = ":*"  # Only targets in this file can depend on this.
+    visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
     sources = [
       "src/mksnapshot.cc",
@@ -1250,6 +1369,7 @@ component("v8") {
 
   direct_dependent_configs = [ ":external_config" ]
 
+  libs = []
   if (is_android && current_toolchain != host_toolchain) {
     libs += [ "log" ]
   }