Revision f230a1cf
configure | ||
---|---|---|
435 | 435 |
def configure_node(o): |
436 | 436 |
if options.dest_os == 'android': |
437 | 437 |
o['variables']['OS'] = 'android' |
438 |
o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0 |
|
439 |
o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs. |
|
440 |
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables. |
|
441 | 438 |
o['variables']['node_prefix'] = os.path.expanduser(options.prefix or '') |
442 | 439 |
o['variables']['node_install_npm'] = b(not options.without_npm) |
443 | 440 |
o['default_configuration'] = 'Debug' if options.debug else 'Release' |
... | ... | |
565 | 562 |
|
566 | 563 |
|
567 | 564 |
def configure_v8(o): |
568 |
o['variables']['v8_use_snapshot'] = b(not options.without_snapshot) |
|
569 | 565 |
o['variables']['node_shared_v8'] = b(options.shared_v8) |
566 |
o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0 |
|
567 |
o['variables']['v8_enable_i18n_support'] = 0 # Don't require libicu. |
|
568 |
o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs. |
|
569 |
o['variables']['v8_optimized_debug'] = 0 # Compile with -O0 in debug builds. |
|
570 |
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables. |
|
571 |
o['variables']['v8_use_snapshot'] = b(not options.without_snapshot) |
|
570 | 572 |
|
571 | 573 |
# assume shared_v8 if one of these is set? |
572 | 574 |
if options.shared_v8_libpath: |
deps/v8/.gitignore | ||
---|---|---|
37 | 37 |
/out |
38 | 38 |
/perf.data |
39 | 39 |
/perf.data.old |
40 |
/test/benchmarks/benchmarks.status2 |
|
41 | 40 |
/test/benchmarks/CHECKED_OUT_* |
42 | 41 |
/test/benchmarks/downloaded_* |
43 | 42 |
/test/benchmarks/kraken |
44 | 43 |
/test/benchmarks/octane |
45 | 44 |
/test/benchmarks/sunspider |
46 |
/test/cctest/cctest.status2 |
|
47 |
/test/message/message.status2 |
|
48 |
/test/mjsunit/mjsunit.status2 |
|
49 | 45 |
/test/mozilla/CHECKED_OUT_VERSION |
50 | 46 |
/test/mozilla/data |
51 | 47 |
/test/mozilla/downloaded_* |
52 |
/test/mozilla/mozilla.status2 |
|
53 |
/test/preparser/preparser.status2 |
|
54 | 48 |
/test/test262/data |
55 | 49 |
/test/test262/test262-* |
56 |
/test/test262/test262.status2 |
|
57 |
/test/webkit/webkit.status2 |
|
58 | 50 |
/third_party |
59 | 51 |
/tools/jsfunfuzz |
60 | 52 |
/tools/jsfunfuzz.zip |
deps/v8/ChangeLog | ||
---|---|---|
1 |
2013-10-31: Version 3.22.24 |
|
2 |
|
|
3 |
Fixed uint32-to-smi conversion in Lithium. |
|
4 |
(Chromium issue 309623) |
|
5 |
|
|
6 |
Performance and stability improvements on all platforms. |
|
7 |
|
|
8 |
|
|
9 |
2013-10-28: Version 3.22.23 |
|
10 |
|
|
11 |
Renamed deprecated __attribute__((no_address_safety_analysis)) to |
|
12 |
__attribute__((no_sanitize_address)) (Chromium issue 311283) |
|
13 |
|
|
14 |
Defined DEBUG for v8_optimized_debug=2 |
|
15 |
|
|
16 |
Performance and stability improvements on all platforms. |
|
17 |
|
|
18 |
|
|
19 |
2013-10-25: Version 3.22.22 |
|
20 |
|
|
21 |
Record allocation stack traces. (Chromium issue 277984,v8:2949) |
|
22 |
|
|
23 |
Performance and stability improvements on all platforms. |
|
24 |
|
|
25 |
|
|
26 |
2013-10-24: Version 3.22.21 |
|
27 |
|
|
28 |
Performance and stability improvements on all platforms. |
|
29 |
|
|
30 |
|
|
31 |
2013-10-24: Version 3.22.20 |
|
32 |
|
|
33 |
Made Array.prototype.pop throw if the last element is not configurable. |
|
34 |
|
|
35 |
Fixed HObjectAccess for loads from migrating prototypes. |
|
36 |
(Chromium issue 305309) |
|
37 |
|
|
38 |
Enabled preaging of code objects when --optimize-for-size. |
|
39 |
(Chromium issue 280984) |
|
40 |
|
|
41 |
Exposed v8::Function::GetDisplayName to public API. |
|
42 |
(Chromium issue 17356) |
|
43 |
|
|
44 |
Performance and stability improvements on all platforms. |
|
45 |
|
|
46 |
|
|
47 |
2013-10-23: Version 3.22.19 |
|
48 |
|
|
49 |
Fix materialization of captured objects with field tracking. |
|
50 |
(Chromium issue 298990) |
|
51 |
|
|
52 |
Performance and stability improvements on all platforms. |
|
53 |
|
|
54 |
|
|
55 |
2013-10-22: Version 3.22.18 |
|
56 |
|
|
57 |
Add tool to visualize machine code/lithium. |
|
58 |
|
|
59 |
Handle misaligned loads and stores in load elimination. Do not track |
|
60 |
misaligned loads and be conservative about invalidating misaligned |
|
61 |
stores. (issue 2934) |
|
62 |
|
|
63 |
Performance and stability improvements on all platforms. |
|
64 |
|
|
65 |
|
|
66 |
2013-10-21: Version 3.22.17 |
|
67 |
|
|
68 |
Harmony: Implement Math.trunc and Math.sign. (issue 2938) |
|
69 |
|
|
70 |
Performance and stability improvements on all platforms. |
|
71 |
|
|
72 |
|
|
73 |
2013-10-21: Version 3.22.16 |
|
74 |
|
|
75 |
Performance and stability improvements on all platforms. |
|
76 |
|
|
77 |
|
|
78 |
2013-10-18: Version 3.22.15 |
|
79 |
|
|
80 |
Enabled calling the SetReference* & SetObjectGroupId functions with a |
|
81 |
Persistent<SubclassOfValue>. |
|
82 |
|
|
83 |
Performance and stability improvements on all platforms. |
|
84 |
|
|
85 |
|
|
86 |
2013-10-17: Version 3.22.14 |
|
87 |
|
|
88 |
Performance and stability improvements on all platforms. |
|
89 |
|
|
90 |
|
|
91 |
2013-10-16: Version 3.22.13 |
|
92 |
|
|
93 |
Do not look up ArrayBuffer on global object in typed array constructor. |
|
94 |
(issue 2931) |
|
95 |
|
|
96 |
Performance and stability improvements on all platforms. |
|
97 |
|
|
98 |
|
|
99 |
2013-10-15: Version 3.22.12 |
|
100 |
|
|
101 |
Added histograms to track fraction of heap spaces and percentage of |
|
102 |
generated crankshaft code. |
|
103 |
|
|
104 |
Moved v8_optimized_debug default value to standalone.gypi. |
|
105 |
|
|
106 |
Track JS allocations as they arrive with no affection on performance |
|
107 |
when tracking is switched off (Chromium issue 277984). |
|
108 |
|
|
109 |
Performance and stability improvements on all platforms. |
|
110 |
|
|
111 |
|
|
112 |
2013-10-14: Version 3.22.11 |
|
113 |
|
|
114 |
Performance and stability improvements on all platforms. |
|
115 |
|
|
116 |
|
|
117 |
2013-10-11: Version 3.22.10 |
|
118 |
|
|
119 |
Fixed timezone issues with date-time/parse-* tests. |
|
120 |
(Chromium issue 2919) |
|
121 |
|
|
122 |
Added column getter to CpuProfileNode (Chromium issue 302537) |
|
123 |
|
|
124 |
Performance and stability improvements on all platforms. |
|
125 |
|
|
126 |
|
|
127 |
2013-10-10: Version 3.22.9 |
|
128 |
|
|
129 |
Ensure only whitelisted stubs have sse2 versions in the snapshot. |
|
130 |
(fix for chromium 304565) |
|
131 |
|
|
132 |
Implement ArrayBuffer.isView. |
|
133 |
|
|
134 |
Performance and stability improvements on all platforms. |
|
135 |
|
|
136 |
|
|
137 |
2013-10-04: Version 3.22.8 |
|
138 |
|
|
139 |
Performance and stability improvements on all platforms. |
|
140 |
|
|
141 |
|
|
142 |
2013-10-03: Version 3.22.7 |
|
143 |
|
|
144 |
Debug: Allow stepping into on a given call frame |
|
145 |
(Chromium issue 296963). |
|
146 |
|
|
147 |
Always use timeGetTime() for TimeTicks::Now() on Windows |
|
148 |
(Chromium issue 288924). |
|
149 |
|
|
150 |
Performance and stability improvements on all platforms. |
|
151 |
|
|
152 |
|
|
153 |
2013-10-02: Version 3.22.6 |
|
154 |
|
|
155 |
Performance and stability improvements on all platforms. |
|
156 |
|
|
157 |
|
|
158 |
2013-10-01: Version 3.22.5 |
|
159 |
|
|
160 |
Disabled externalization of sliced/cons strings in old pointer space |
|
161 |
(Chromium issue 276357). |
|
162 |
|
|
163 |
Turned on handle zapping for release builds |
|
164 |
|
|
165 |
Performance and stability improvements on all platforms. |
|
166 |
|
|
167 |
|
|
168 |
2013-09-30: Version 3.22.4 |
|
169 |
|
|
170 |
Function::Call and Object::CallAsFunction APIs should allow v8::Value as |
|
171 |
a receiver (issue 2915). |
|
172 |
|
|
173 |
Removed unnecessary mutex (Chromium issue 291236). |
|
174 |
|
|
175 |
Removed ArrayBufferView::BaseAddress method. |
|
176 |
|
|
177 |
Performance and stability improvements on all platforms. |
|
178 |
|
|
179 |
|
|
180 |
2013-09-27: Version 3.22.3 |
|
181 |
|
|
182 |
Added methods to enable configuration of ResourceConstraints based on |
|
183 |
limits derived at runtime. |
|
184 |
(Chromium issue 292928) |
|
185 |
|
|
186 |
Added -optimize-for-size flag to optimize for memory size (will be used |
|
187 |
by pre-aging CL), and removed the is_memory_constrained |
|
188 |
ResourceConstraint. |
|
189 |
(Chromium issue 292928) |
|
190 |
|
|
191 |
Performance and stability improvements on all platforms. |
|
192 |
|
|
193 |
|
|
194 |
2013-09-26: Version 3.22.2 |
|
195 |
|
|
196 |
Performance and stability improvements on all platforms. |
|
197 |
|
|
198 |
|
|
199 |
2013-09-25: Version 3.22.1 |
|
200 |
|
|
201 |
Sped up creating typed arrays from array-like objects. |
|
202 |
(Chromium issue 270507) |
|
203 |
|
|
204 |
Performance and stability improvements on all platforms. |
|
205 |
|
|
206 |
|
|
207 |
2013-09-23: Version 3.22.0 |
|
208 |
|
|
209 |
LiveEdit to mark more closure functions for re-instantiation when scope |
|
210 |
layout changes. |
|
211 |
(issue 2872) |
|
212 |
|
|
213 |
Made bounds check elimination iterative instead of recursive. |
|
214 |
(Chromium issue 289706) |
|
215 |
|
|
216 |
Turned on i18n support by default. |
|
217 |
|
|
218 |
Set the proper instance-type on HAllocate in BuildFastLiteral. |
|
219 |
(Chromium issue 284577) |
|
220 |
|
|
221 |
Performance and stability improvements on all platforms. |
|
222 |
|
|
223 |
|
|
1 | 224 |
2013-09-18: Version 3.21.17 |
2 | 225 |
|
3 | 226 |
Implemented local load/store elimination on basic blocks. |
deps/v8/Makefile | ||
---|---|---|
76 | 76 |
endif |
77 | 77 |
# extrachecks=on/off |
78 | 78 |
ifeq ($(extrachecks), on) |
79 |
GYPFLAGS += -Dv8_enable_extra_checks=1 |
|
79 |
GYPFLAGS += -Dv8_enable_extra_checks=1 -Dv8_enable_handle_zapping=1
|
|
80 | 80 |
endif |
81 | 81 |
ifeq ($(extrachecks), off) |
82 |
GYPFLAGS += -Dv8_enable_extra_checks=0 |
|
82 |
GYPFLAGS += -Dv8_enable_extra_checks=0 -Dv8_enable_handle_zapping=0
|
|
83 | 83 |
endif |
84 | 84 |
# gdbjit=on/off |
85 | 85 |
ifeq ($(gdbjit), on) |
... | ... | |
124 | 124 |
ifeq ($(regexp), interpreted) |
125 | 125 |
GYPFLAGS += -Dv8_interpreted_regexp=1 |
126 | 126 |
endif |
127 |
# i18nsupport=on |
|
128 |
ifeq ($(i18nsupport), on) |
|
129 |
GYPFLAGS += -Dv8_enable_i18n_support=1 |
|
127 |
# i18nsupport=off |
|
128 |
ifeq ($(i18nsupport), off) |
|
129 |
GYPFLAGS += -Dv8_enable_i18n_support=0 |
|
130 |
TESTFLAGS += --noi18n |
|
130 | 131 |
endif |
132 |
# deprecation_warnings=on |
|
133 |
ifeq ($(deprecationwarnings), on) |
|
134 |
GYPFLAGS += -Dv8_deprecation_warnings=1 |
|
135 |
endif |
|
131 | 136 |
# arm specific flags. |
132 | 137 |
# armv7=false/true |
133 | 138 |
ifeq ($(armv7), false) |
... | ... | |
217 | 222 |
|
218 | 223 |
# List of files that trigger Makefile regeneration: |
219 | 224 |
GYPFILES = build/all.gyp build/features.gypi build/standalone.gypi \ |
220 |
build/toolchain.gypi preparser/preparser.gyp samples/samples.gyp \
|
|
221 |
src/d8.gyp test/cctest/cctest.gyp tools/gyp/v8.gyp
|
|
225 |
build/toolchain.gypi samples/samples.gyp src/d8.gyp \
|
|
226 |
test/cctest/cctest.gyp tools/gyp/v8.gyp
|
|
222 | 227 |
|
223 | 228 |
# If vtunejit=on, the v8vtune.gyp will be appended. |
224 | 229 |
ifeq ($(vtunejit), on) |
... | ... | |
323 | 328 |
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ |
324 | 329 |
--arch-and-mode=$(basename $@) \ |
325 | 330 |
--timeout=600 \ |
326 |
--command-prefix="tools/android-run.py" |
|
331 |
--command-prefix="tools/android-run.py" $(TESTFLAGS)
|
|
327 | 332 |
|
328 | 333 |
$(addsuffix .check, $(ANDROID_ARCHES)): \ |
329 | 334 |
$(addprefix $$(basename $$@).,$(MODES)).check |
... | ... | |
331 | 336 |
$(addsuffix .check, $(NACL_BUILDS)): $$(basename $$@) |
332 | 337 |
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ |
333 | 338 |
--arch-and-mode=$(basename $@) \ |
334 |
--timeout=600 --nopresubmit \ |
|
339 |
--timeout=600 --nopresubmit --noi18n \
|
|
335 | 340 |
--command-prefix="tools/nacl-run.py" |
336 | 341 |
|
337 | 342 |
$(addsuffix .check, $(NACL_ARCHES)): \ |
deps/v8/Makefile.nacl | ||
---|---|---|
74 | 74 |
# For mksnapshot host generation. |
75 | 75 |
GYPENV += host_os=${HOST_OS} |
76 | 76 |
|
77 |
# ICU doesn't support NaCl. |
|
78 |
GYPENV += v8_enable_i18n_support=0 |
|
79 |
|
|
77 | 80 |
NACL_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(NACL_ARCHES)) |
78 | 81 |
.SECONDEXPANSION: |
79 | 82 |
# For some reason the $$(basename $$@) expansion didn't work here... |
deps/v8/OWNERS | ||
---|---|---|
2 | 2 |
danno@chromium.org |
3 | 3 |
dslomov@chromium.org |
4 | 4 |
hpayer@chromium.org |
5 |
ishell@chromium.org |
|
5 | 6 |
jkummerow@chromium.org |
6 |
mmassi@chromium.org
|
|
7 |
machenbach@chromium.org
|
|
7 | 8 |
mstarzinger@chromium.org |
8 | 9 |
mvstanton@chromium.org |
9 | 10 |
rossberg@chromium.org |
10 | 11 |
svenpanne@chromium.org |
12 |
titzer@chromium.org |
|
11 | 13 |
ulan@chromium.org |
12 | 14 |
vegorov@chromium.org |
13 | 15 |
verwaest@chromium.org |
deps/v8/PRESUBMIT.py | ||
---|---|---|
58 | 58 |
return results |
59 | 59 |
|
60 | 60 |
|
61 |
def _SkipTreeCheck(input_api, output_api): |
|
62 |
"""Check the env var whether we want to skip tree check. |
|
63 |
Only skip if src/version.cc has been updated.""" |
|
64 |
src_version = 'src/version.cc' |
|
65 |
FilterFile = lambda file: file.LocalPath() == src_version |
|
66 |
if not input_api.AffectedSourceFiles( |
|
67 |
lambda file: file.LocalPath() == src_version): |
|
68 |
return False |
|
69 |
return input_api.environ.get('PRESUBMIT_TREE_CHECK') == 'skip' |
|
70 |
|
|
71 |
|
|
61 | 72 |
def CheckChangeOnUpload(input_api, output_api): |
62 | 73 |
results = [] |
63 | 74 |
results.extend(_CommonChecks(input_api, output_api)) |
... | ... | |
69 | 80 |
results.extend(_CommonChecks(input_api, output_api)) |
70 | 81 |
results.extend(input_api.canned_checks.CheckChangeHasDescription( |
71 | 82 |
input_api, output_api)) |
72 |
results.extend(input_api.canned_checks.CheckTreeIsOpen( |
|
73 |
input_api, output_api, |
|
74 |
json_url='http://v8-status.appspot.com/current?format=json')) |
|
83 |
if not _SkipTreeCheck(input_api, output_api): |
|
84 |
results.extend(input_api.canned_checks.CheckTreeIsOpen( |
|
85 |
input_api, output_api, |
|
86 |
json_url='http://v8-status.appspot.com/current?format=json')) |
|
75 | 87 |
return results |
deps/v8/WATCHLISTS | ||
---|---|---|
1 |
# Copyright 2013 the V8 project authors. All rights reserved. |
|
2 |
# Redistribution and use in source and binary forms, with or without |
|
3 |
# modification, are permitted provided that the following conditions are |
|
4 |
# met: |
|
5 |
# |
|
6 |
# * Redistributions of source code must retain the above copyright |
|
7 |
# notice, this list of conditions and the following disclaimer. |
|
8 |
# * Redistributions in binary form must reproduce the above |
|
9 |
# copyright notice, this list of conditions and the following |
|
10 |
# disclaimer in the documentation and/or other materials provided |
|
11 |
# with the distribution. |
|
12 |
# * Neither the name of Google Inc. nor the names of its |
|
13 |
# contributors may be used to endorse or promote products derived |
|
14 |
# from this software without specific prior written permission. |
|
15 |
# |
|
16 |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|
17 |
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|
18 |
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
|
19 |
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
|
20 |
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
21 |
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
22 |
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
|
23 |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
|
24 |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
25 |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
26 |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
27 |
|
|
28 |
# Watchlist Rules |
|
29 |
# Refer: http://dev.chromium.org/developers/contributing-code/watchlists |
|
30 |
|
|
31 |
# IMPORTANT: The regular expression filepath is tested against each path using |
|
32 |
# re.search, so it is not usually necessary to add .*. |
|
33 |
|
|
34 |
{ |
|
35 |
'WATCHLIST_DEFINITIONS': { |
|
36 |
'public_api': { |
|
37 |
'filepath': 'include/', |
|
38 |
}, |
|
39 |
}, |
|
40 |
|
|
41 |
'WATCHLISTS': { |
|
42 |
'public_api': [ |
|
43 |
'phajdan.jr@chromium.org', |
|
44 |
], |
|
45 |
}, |
|
46 |
} |
deps/v8/benchmarks/deltablue.js | ||
---|---|---|
121 | 121 |
|
122 | 122 |
Strength.prototype.nextWeaker = function () { |
123 | 123 |
switch (this.strengthValue) { |
124 |
case 0: return Strength.WEAKEST;
|
|
125 |
case 1: return Strength.WEAK_DEFAULT;
|
|
126 |
case 2: return Strength.NORMAL;
|
|
127 |
case 3: return Strength.STRONG_DEFAULT;
|
|
128 |
case 4: return Strength.PREFERRED;
|
|
129 |
case 5: return Strength.REQUIRED;
|
|
124 |
case 0: return Strength.STRONG_PREFERRED;
|
|
125 |
case 1: return Strength.PREFERRED;
|
|
126 |
case 2: return Strength.STRONG_DEFAULT;
|
|
127 |
case 3: return Strength.NORMAL;
|
|
128 |
case 4: return Strength.WEAK_DEFAULT;
|
|
129 |
case 5: return Strength.WEAKEST;
|
|
130 | 130 |
} |
131 | 131 |
} |
132 | 132 |
|
133 | 133 |
// Strength constants. |
134 |
Strength.REQUIRED = new Strength(0, "required"); |
|
135 |
Strength.STONG_PREFERRED = new Strength(1, "strongPreferred"); |
|
136 |
Strength.PREFERRED = new Strength(2, "preferred"); |
|
137 |
Strength.STRONG_DEFAULT = new Strength(3, "strongDefault"); |
|
138 |
Strength.NORMAL = new Strength(4, "normal"); |
|
139 |
Strength.WEAK_DEFAULT = new Strength(5, "weakDefault"); |
|
140 |
Strength.WEAKEST = new Strength(6, "weakest"); |
|
134 |
Strength.REQUIRED = new Strength(0, "required");
|
|
135 |
Strength.STRONG_PREFERRED = new Strength(1, "strongPreferred");
|
|
136 |
Strength.PREFERRED = new Strength(2, "preferred");
|
|
137 |
Strength.STRONG_DEFAULT = new Strength(3, "strongDefault");
|
|
138 |
Strength.NORMAL = new Strength(4, "normal");
|
|
139 |
Strength.WEAK_DEFAULT = new Strength(5, "weakDefault");
|
|
140 |
Strength.WEAKEST = new Strength(6, "weakest");
|
|
141 | 141 |
|
142 | 142 |
/* --- * |
143 | 143 |
* C o n s t r a i n t |
deps/v8/build/all.gyp | ||
---|---|---|
8 | 8 |
'target_name': 'All', |
9 | 9 |
'type': 'none', |
10 | 10 |
'dependencies': [ |
11 |
'../preparser/preparser.gyp:*', |
|
12 | 11 |
'../samples/samples.gyp:*', |
13 | 12 |
'../src/d8.gyp:d8', |
14 | 13 |
'../test/cctest/cctest.gyp:*', |
deps/v8/build/features.gypi | ||
---|---|---|
54 | 54 |
|
55 | 55 |
# Enable ECMAScript Internationalization API. Enabling this feature will |
56 | 56 |
# add a dependency on the ICU library. |
57 |
'v8_enable_i18n_support%': 0, |
|
57 |
'v8_enable_i18n_support%': 1, |
|
58 |
|
|
59 |
# Enable compiler warnings when using V8_DEPRECATED apis. |
|
60 |
'v8_deprecation_warnings%': 0, |
|
58 | 61 |
}, |
59 | 62 |
'target_defaults': { |
60 | 63 |
'conditions': [ |
... | ... | |
76 | 79 |
['v8_interpreted_regexp==1', { |
77 | 80 |
'defines': ['V8_INTERPRETED_REGEXP',], |
78 | 81 |
}], |
82 |
['v8_deprecation_warnings==1', { |
|
83 |
'defines': ['V8_DEPRECATION_WARNINGS',], |
|
84 |
}], |
|
79 | 85 |
['v8_enable_i18n_support==1', { |
80 | 86 |
'defines': ['V8_I18N_SUPPORT',], |
81 | 87 |
}], |
... | ... | |
89 | 95 |
'Debug': { |
90 | 96 |
'variables': { |
91 | 97 |
'v8_enable_extra_checks%': 1, |
98 |
'v8_enable_handle_zapping%': 1, |
|
92 | 99 |
}, |
93 | 100 |
'conditions': [ |
94 | 101 |
['v8_enable_extra_checks==1', { |
95 | 102 |
'defines': ['ENABLE_EXTRA_CHECKS',], |
96 | 103 |
}], |
104 |
['v8_enable_handle_zapping==1', { |
|
105 |
'defines': ['ENABLE_HANDLE_ZAPPING',], |
|
106 |
}], |
|
97 | 107 |
], |
98 | 108 |
}, # Debug |
99 | 109 |
'Release': { |
100 | 110 |
'variables': { |
101 | 111 |
'v8_enable_extra_checks%': 0, |
112 |
'v8_enable_handle_zapping%': 0, |
|
102 | 113 |
}, |
103 | 114 |
'conditions': [ |
104 | 115 |
['v8_enable_extra_checks==1', { |
105 | 116 |
'defines': ['ENABLE_EXTRA_CHECKS',], |
106 | 117 |
}], |
118 |
['v8_enable_handle_zapping==1', { |
|
119 |
'defines': ['ENABLE_HANDLE_ZAPPING',], |
|
120 |
}], |
|
107 | 121 |
], # conditions |
108 | 122 |
}, # Release |
109 | 123 |
}, # configurations |
deps/v8/build/standalone.gypi | ||
---|---|---|
36 | 36 |
'clang%': 0, |
37 | 37 |
'visibility%': 'hidden', |
38 | 38 |
'v8_enable_backtrace%': 0, |
39 |
'v8_enable_i18n_support%': 0,
|
|
39 |
'v8_enable_i18n_support%': 1,
|
|
40 | 40 |
'msvs_multi_core_compile%': '1', |
41 | 41 |
'mac_deployment_target%': '10.5', |
42 | 42 |
'variables': { |
... | ... | |
77 | 77 |
# as errors. |
78 | 78 |
'v8_code%': 0, |
79 | 79 |
|
80 |
# Speeds up Debug builds: |
|
81 |
# 0 - Compiler optimizations off (debuggable) (default). This may |
|
82 |
# be 5x slower than Release (or worse). |
|
83 |
# 1 - Turn on compiler optimizations. This may be hard or impossible to |
|
84 |
# debug. This may still be 2x slower than Release (or worse). |
|
85 |
# 2 - Turn on optimizations, and also #undef DEBUG / #define NDEBUG |
|
86 |
# (but leave V8_ENABLE_CHECKS and most other assertions enabled. |
|
87 |
# This may cause some v8 tests to fail in the Debug configuration. |
|
88 |
# This roughly matches the performance of a Release build and can |
|
89 |
# be used by embedders that need to build their own code as debug |
|
90 |
# but don't want or need a debug version of V8. This should produce |
|
91 |
# near-release speeds. |
|
92 |
'v8_optimized_debug%': 0, |
|
93 |
|
|
94 |
# Relative path to icu.gyp from this file. |
|
95 |
'icu_gyp_path': '../third_party/icu/icu.gyp', |
|
96 |
|
|
80 | 97 |
'conditions': [ |
81 | 98 |
['(v8_target_arch=="arm" and host_arch!="arm") or \ |
82 | 99 |
(v8_target_arch=="mipsel" and host_arch!="mipsel") or \ |
deps/v8/build/toolchain.gypi | ||
---|---|---|
60 | 60 |
|
61 | 61 |
'v8_enable_backtrace%': 0, |
62 | 62 |
|
63 |
# Speeds up Debug builds: |
|
64 |
# 0 - Compiler optimizations off (debuggable) (default). This may |
|
65 |
# be 5x slower than Release (or worse). |
|
66 |
# 1 - Turn on compiler optimizations. This may be hard or impossible to |
|
67 |
# debug. This may still be 2x slower than Release (or worse). |
|
68 |
# 2 - Turn on optimizations, and also #undef DEBUG / #define NDEBUG |
|
69 |
# (but leave V8_ENABLE_CHECKS and most other assertions enabled. |
|
70 |
# This may cause some v8 tests to fail in the Debug configuration. |
|
71 |
# This roughly matches the performance of a Release build and can |
|
72 |
# be used by embedders that need to build their own code as debug |
|
73 |
# but don't want or need a debug version of V8. This should produce |
|
74 |
# near-release speeds. |
|
75 |
'v8_optimized_debug%': 0, |
|
76 |
|
|
77 | 63 |
# Enable profiling support. Only required on Windows. |
78 | 64 |
'v8_enable_prof%': 0, |
79 | 65 |
|
... | ... | |
450 | 436 |
'V8_ENABLE_CHECKS', |
451 | 437 |
'OBJECT_PRINT', |
452 | 438 |
'VERIFY_HEAP', |
439 |
'DEBUG' |
|
453 | 440 |
], |
454 | 441 |
'msvs_settings': { |
455 | 442 |
'VCCLCompilerTool': { |
... | ... | |
517 | 504 |
}, |
518 | 505 |
}, |
519 | 506 |
'conditions': [ |
520 |
['v8_optimized_debug==2', { |
|
521 |
'defines': [ |
|
522 |
'NDEBUG', |
|
523 |
], |
|
524 |
}, { |
|
525 |
'defines': [ |
|
526 |
'DEBUG', |
|
527 |
], |
|
528 |
}], |
|
529 | 507 |
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { |
530 | 508 |
'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', |
531 | 509 |
'-Wnon-virtual-dtor', '-Woverloaded-virtual', |
... | ... | |
567 | 545 |
'-fdata-sections', |
568 | 546 |
'-ffunction-sections', |
569 | 547 |
], |
548 |
'defines': [ |
|
549 |
'OPTIMIZED_DEBUG' |
|
550 |
], |
|
570 | 551 |
'conditions': [ |
571 | 552 |
# TODO(crbug.com/272548): Avoid -O3 in NaCl |
572 | 553 |
['nacl_target_arch=="none"', { |
deps/v8/include/v8-debug.h | ||
---|---|---|
212 | 212 |
|
213 | 213 |
// If no isolate is provided the default isolate is |
214 | 214 |
// used. |
215 |
// TODO(dcarney): remove |
|
215 | 216 |
static void SendCommand(const uint16_t* command, int length, |
216 | 217 |
ClientData* client_data = NULL, |
217 | 218 |
Isolate* isolate = NULL); |
219 |
static void SendCommand(Isolate* isolate, |
|
220 |
const uint16_t* command, int length, |
|
221 |
ClientData* client_data = NULL); |
|
218 | 222 |
|
219 | 223 |
// Dispatch interface. |
220 | 224 |
static void SetHostDispatchHandler(HostDispatchHandler handler, |
deps/v8/include/v8-defaults.h | ||
---|---|---|
1 |
// Copyright 2013 the V8 project authors. All rights reserved. |
|
2 |
// Redistribution and use in source and binary forms, with or without |
|
3 |
// modification, are permitted provided that the following conditions are |
|
4 |
// met: |
|
5 |
// |
|
6 |
// * Redistributions of source code must retain the above copyright |
|
7 |
// notice, this list of conditions and the following disclaimer. |
|
8 |
// * Redistributions in binary form must reproduce the above |
|
9 |
// copyright notice, this list of conditions and the following |
|
10 |
// disclaimer in the documentation and/or other materials provided |
|
11 |
// with the distribution. |
|
12 |
// * Neither the name of Google Inc. nor the names of its |
|
13 |
// contributors may be used to endorse or promote products derived |
|
14 |
// from this software without specific prior written permission. |
|
15 |
// |
|
16 |
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|
17 |
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|
18 |
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
|
19 |
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
|
20 |
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
21 |
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
22 |
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
|
23 |
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
|
24 |
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
25 |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
26 |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
27 |
|
|
28 |
#ifndef V8_V8_DEFAULTS_H_ |
|
29 |
#define V8_V8_DEFAULTS_H_ |
|
30 |
|
|
31 |
#include "v8.h" |
|
32 |
|
|
33 |
/** |
|
34 |
* Default configuration support for the V8 JavaScript engine. |
|
35 |
*/ |
|
36 |
namespace v8 { |
|
37 |
|
|
38 |
/** |
|
39 |
* Configures the constraints with reasonable default values based on the |
|
40 |
* capabilities of the current device the VM is running on. |
|
41 |
*/ |
|
42 |
bool V8_EXPORT ConfigureResourceConstraintsForCurrentPlatform( |
|
43 |
ResourceConstraints* constraints); |
|
44 |
|
|
45 |
|
|
46 |
/** |
|
47 |
* Convience function which performs SetResourceConstraints with the settings |
|
48 |
* returned by ConfigureResourceConstraintsForCurrentPlatform. |
|
49 |
*/ |
|
50 |
bool V8_EXPORT SetDefaultResourceConstraintsForCurrentPlatform(); |
|
51 |
|
|
52 |
} // namespace v8 |
|
53 |
|
|
54 |
#endif // V8_V8_DEFAULTS_H_ |
deps/v8/include/v8-preparser.h | ||
---|---|---|
1 |
// Copyright 2011 the V8 project authors. All rights reserved. |
|
2 |
// Redistribution and use in source and binary forms, with or without |
|
3 |
// modification, are permitted provided that the following conditions are |
|
4 |
// met: |
|
5 |
// |
|
6 |
// * Redistributions of source code must retain the above copyright |
|
7 |
// notice, this list of conditions and the following disclaimer. |
|
8 |
// * Redistributions in binary form must reproduce the above |
|
9 |
// copyright notice, this list of conditions and the following |
|
10 |
// disclaimer in the documentation and/or other materials provided |
|
11 |
// with the distribution. |
|
12 |
// * Neither the name of Google Inc. nor the names of its |
|
13 |
// contributors may be used to endorse or promote products derived |
|
14 |
// from this software without specific prior written permission. |
|
15 |
// |
|
16 |
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|
17 |
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|
18 |
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
|
19 |
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
|
20 |
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
21 |
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
22 |
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
|
23 |
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
|
24 |
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
25 |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
26 |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
27 |
|
|
28 |
#ifndef PREPARSER_H |
|
29 |
#define PREPARSER_H |
|
30 |
|
|
31 |
#include "v8.h" |
|
32 |
#include "v8stdint.h" |
|
33 |
|
|
34 |
namespace v8 { |
|
35 |
|
|
36 |
// The result of preparsing is either a stack overflow error, or an opaque |
|
37 |
// blob of data that can be passed back into the parser. |
|
38 |
class V8_EXPORT PreParserData { |
|
39 |
public: |
|
40 |
PreParserData(size_t size, const uint8_t* data) |
|
41 |
: data_(data), size_(size) { } |
|
42 |
|
|
43 |
// Create a PreParserData value where stack_overflow reports true. |
|
44 |
static PreParserData StackOverflow() { return PreParserData(0, NULL); } |
|
45 |
|
|
46 |
// Whether the pre-parser stopped due to a stack overflow. |
|
47 |
// If this is the case, size() and data() should not be used. |
|
48 |
bool stack_overflow() { return size_ == 0u; } |
|
49 |
|
|
50 |
// The size of the data in bytes. |
|
51 |
size_t size() const { return size_; } |
|
52 |
|
|
53 |
// Pointer to the data. |
|
54 |
const uint8_t* data() const { return data_; } |
|
55 |
|
|
56 |
private: |
|
57 |
const uint8_t* const data_; |
|
58 |
const size_t size_; |
|
59 |
}; |
|
60 |
|
|
61 |
|
|
62 |
// Interface for a stream of Unicode characters. |
|
63 |
class V8_EXPORT UnicodeInputStream { // NOLINT - V8_EXPORT is not a class name. |
|
64 |
public: |
|
65 |
virtual ~UnicodeInputStream(); |
|
66 |
|
|
67 |
// Returns the next Unicode code-point in the input, or a negative value when |
|
68 |
// there is no more input in the stream. |
|
69 |
virtual int32_t Next() = 0; |
|
70 |
}; |
|
71 |
|
|
72 |
|
|
73 |
// Preparse a JavaScript program. The source code is provided as a |
|
74 |
// UnicodeInputStream. The max_stack_size limits the amount of stack |
|
75 |
// space that the preparser is allowed to use. If the preparser uses |
|
76 |
// more stack space than the limit provided, the result's stack_overflow() |
|
77 |
// method will return true. Otherwise the result contains preparser |
|
78 |
// data that can be used by the V8 parser to speed up parsing. |
|
79 |
PreParserData V8_EXPORT Preparse(UnicodeInputStream* input, |
|
80 |
size_t max_stack_size); |
|
81 |
|
|
82 |
} // namespace v8. |
|
83 |
|
|
84 |
#endif // PREPARSER_H |
deps/v8/include/v8-profiler.h | ||
---|---|---|
57 | 57 |
*/ |
58 | 58 |
int GetLineNumber() const; |
59 | 59 |
|
60 |
/** |
|
61 |
* Returns 1-based number of the column where the function originates. |
|
62 |
* kNoColumnNumberInfo if no column number information is available. |
|
63 |
*/ |
|
64 |
int GetColumnNumber() const; |
|
65 |
|
|
60 | 66 |
/** Returns bailout reason for the function |
61 | 67 |
* if the optimization was disabled for it. |
62 | 68 |
*/ |
63 | 69 |
const char* GetBailoutReason() const; |
64 | 70 |
|
65 |
/** DEPRECATED. Please use GetHitCount instead. |
|
66 |
* Returns the count of samples where function was currently executing. |
|
67 |
*/ |
|
68 |
V8_DEPRECATED(double GetSelfSamplesCount() const); |
|
69 |
|
|
70 | 71 |
/** |
71 | 72 |
* Returns the count of samples where the function was currently executing. |
72 | 73 |
*/ |
... | ... | |
85 | 86 |
const CpuProfileNode* GetChild(int index) const; |
86 | 87 |
|
87 | 88 |
static const int kNoLineNumberInfo = Message::kNoLineNumberInfo; |
89 |
static const int kNoColumnNumberInfo = Message::kNoColumnInfo; |
|
88 | 90 |
}; |
89 | 91 |
|
90 | 92 |
|
... | ... | |
473 | 475 |
*/ |
474 | 476 |
void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); |
475 | 477 |
|
478 |
/** |
|
479 |
* Starts recording JS allocations immediately as they arrive and tracking of |
|
480 |
* heap objects population statistics. |
|
481 |
*/ |
|
482 |
void StartRecordingHeapAllocations(); |
|
483 |
|
|
484 |
/** |
|
485 |
* Stops recording JS allocations and tracking of heap objects population |
|
486 |
* statistics, cleans all collected heap objects population statistics data. |
|
487 |
*/ |
|
488 |
void StopRecordingHeapAllocations(); |
|
489 |
|
|
490 |
|
|
476 | 491 |
private: |
477 | 492 |
HeapProfiler(); |
478 | 493 |
~HeapProfiler(); |
deps/v8/include/v8-testing.h | ||
---|---|---|
68 | 68 |
|
69 | 69 |
} // namespace v8 |
70 | 70 |
|
71 |
|
|
72 |
#undef V8_EXPORT |
|
73 |
|
|
74 |
|
|
75 | 71 |
#endif // V8_V8_TEST_H_ |
deps/v8/include/v8.h | ||
---|---|---|
135 | 135 |
class ObjectOperationDescriptor; |
136 | 136 |
class RawOperationDescriptor; |
137 | 137 |
class CallHandlerHelper; |
138 |
class EscapableHandleScope; |
|
138 | 139 |
|
139 | 140 |
namespace internal { |
140 | 141 |
class Arguments; |
... | ... | |
377 | 378 |
* The referee is kept alive by the local handle even when |
378 | 379 |
* the original handle is destroyed/disposed. |
379 | 380 |
*/ |
380 |
V8_INLINE static Local<T> New(Handle<T> that); |
|
381 | 381 |
V8_INLINE static Local<T> New(Isolate* isolate, Handle<T> that); |
382 | 382 |
template<class M> |
383 | 383 |
V8_INLINE static Local<T> New(Isolate* isolate, |
... | ... | |
401 | 401 |
friend class Context; |
402 | 402 |
template<class F> friend class internal::CustomArguments; |
403 | 403 |
friend class HandleScope; |
404 |
friend class EscapableHandleScope; |
|
404 | 405 |
|
405 | 406 |
V8_INLINE static Local<T> New(Isolate* isolate, T* that); |
406 | 407 |
}; |
... | ... | |
480 | 481 |
|
481 | 482 |
|
482 | 483 |
/** |
484 |
* Helper class traits to allow copying and assignment of Persistent. |
|
485 |
* This will clone the contents of storage cell, but not any of the flags, etc. |
|
486 |
*/ |
|
487 |
template<class T> |
|
488 |
struct CopyablePersistentTraits { |
|
489 |
typedef Persistent<T, CopyablePersistentTraits<T> > CopyablePersistent; |
|
490 |
static const bool kResetInDestructor = true; |
|
491 |
template<class S, class M> |
|
492 |
static V8_INLINE void Copy(const Persistent<S, M>& source, |
|
493 |
CopyablePersistent* dest) { |
|
494 |
// do nothing, just allow copy |
|
495 |
} |
|
496 |
}; |
|
497 |
|
|
498 |
|
|
499 |
/** |
|
483 | 500 |
* An object reference that is independent of any handle scope. Where |
484 | 501 |
* a Local handle only lives as long as the HandleScope in which it was |
485 | 502 |
* allocated, a Persistent handle remains valid until it is explicitly |
... | ... | |
567 | 584 |
*/ |
568 | 585 |
template <class S, class M2> |
569 | 586 |
V8_INLINE void Reset(Isolate* isolate, const Persistent<S, M2>& other); |
570 |
// TODO(dcarney): deprecate |
|
571 |
V8_INLINE void Dispose() { Reset(); }
|
|
572 |
V8_DEPRECATED(V8_INLINE void Dispose(Isolate* isolate)) { Reset(); }
|
|
587 |
|
|
588 |
V8_DEPRECATED("Use Reset instead",
|
|
589 |
V8_INLINE void Dispose()) { Reset(); }
|
|
573 | 590 |
|
574 | 591 |
V8_INLINE bool IsEmpty() const { return val_ == 0; } |
575 | 592 |
|
... | ... | |
625 | 642 |
P* parameter, |
626 | 643 |
typename WeakCallbackData<S, P>::Callback callback); |
627 | 644 |
|
628 |
// TODO(dcarney): deprecate |
|
629 | 645 |
template<typename S, typename P> |
630 |
V8_INLINE void MakeWeak( |
|
631 |
P* parameter, |
|
632 |
typename WeakReferenceCallbacks<S, P>::Revivable callback); |
|
646 |
V8_DEPRECATED( |
|
647 |
"Use SetWeak instead", |
|
648 |
V8_INLINE void MakeWeak( |
|
649 |
P* parameter, |
|
650 |
typename WeakReferenceCallbacks<S, P>::Revivable callback)); |
|
633 | 651 |
|
634 |
// TODO(dcarney): deprecate |
|
635 | 652 |
template<typename P> |
636 |
V8_INLINE void MakeWeak( |
|
637 |
P* parameter, |
|
638 |
typename WeakReferenceCallbacks<T, P>::Revivable callback); |
|
653 |
V8_DEPRECATED( |
|
654 |
"Use SetWeak instead", |
|
655 |
V8_INLINE void MakeWeak( |
|
656 |
P* parameter, |
|
657 |
typename WeakReferenceCallbacks<T, P>::Revivable callback)); |
|
639 | 658 |
|
640 | 659 |
V8_INLINE void ClearWeak(); |
641 | 660 |
|
642 |
V8_DEPRECATED(V8_INLINE void ClearWeak(Isolate* isolate)) { ClearWeak(); } |
|
643 |
|
|
644 | 661 |
/** |
645 | 662 |
* Marks the reference to this object independent. Garbage collector is free |
646 | 663 |
* to ignore any object groups containing this object. Weak callback for an |
... | ... | |
649 | 666 |
*/ |
650 | 667 |
V8_INLINE void MarkIndependent(); |
651 | 668 |
|
652 |
V8_DEPRECATED(V8_INLINE void MarkIndependent(Isolate* isolate)) { |
|
653 |
MarkIndependent(); |
|
654 |
} |
|
655 |
|
|
656 | 669 |
/** |
657 | 670 |
* Marks the reference to this object partially dependent. Partially dependent |
658 | 671 |
* handles only depend on other partially dependent handles and these |
... | ... | |
663 | 676 |
*/ |
664 | 677 |
V8_INLINE void MarkPartiallyDependent(); |
665 | 678 |
|
666 |
V8_DEPRECATED(V8_INLINE void MarkPartiallyDependent(Isolate* isolate)) { |
|
667 |
MarkPartiallyDependent(); |
|
668 |
} |
|
669 |
|
|
670 | 679 |
V8_INLINE bool IsIndependent() const; |
671 | 680 |
|
672 |
V8_DEPRECATED(V8_INLINE bool IsIndependent(Isolate* isolate) const) { |
|
673 |
return IsIndependent(); |
|
674 |
} |
|
675 |
|
|
676 | 681 |
/** Checks if the handle holds the only reference to an object. */ |
677 | 682 |
V8_INLINE bool IsNearDeath() const; |
678 | 683 |
|
679 |
V8_DEPRECATED(V8_INLINE bool IsNearDeath(Isolate* isolate) const) { |
|
680 |
return IsNearDeath(); |
|
681 |
} |
|
682 |
|
|
683 | 684 |
/** Returns true if the handle's reference is weak. */ |
684 | 685 |
V8_INLINE bool IsWeak() const; |
685 | 686 |
|
686 |
V8_DEPRECATED(V8_INLINE bool IsWeak(Isolate* isolate) const) { |
|
687 |
return IsWeak(); |
|
688 |
} |
|
689 |
|
|
690 | 687 |
/** |
691 | 688 |
* Assigns a wrapper class ID to the handle. See RetainedObjectInfo interface |
692 | 689 |
* description in v8-profiler.h for details. |
693 | 690 |
*/ |
694 | 691 |
V8_INLINE void SetWrapperClassId(uint16_t class_id); |
695 | 692 |
|
696 |
V8_DEPRECATED( |
|
697 |
V8_INLINE void SetWrapperClassId(Isolate * isolate, uint16_t class_id)) { |
|
698 |
SetWrapperClassId(class_id); |
|
699 |
} |
|
700 |
|
|
701 | 693 |
/** |
702 | 694 |
* Returns the class ID previously assigned to this handle or 0 if no class ID |
703 | 695 |
* was previously assigned. |
704 | 696 |
*/ |
705 | 697 |
V8_INLINE uint16_t WrapperClassId() const; |
706 | 698 |
|
707 |
V8_DEPRECATED(V8_INLINE uint16_t WrapperClassId(Isolate* isolate) const) { |
|
708 |
return WrapperClassId(); |
|
709 |
} |
|
710 |
|
|
711 |
// TODO(dcarney): remove |
|
712 |
V8_INLINE T* ClearAndLeak(); |
|
699 |
V8_DEPRECATED("This will be removed", |
|
700 |
V8_INLINE T* ClearAndLeak()); |
|
713 | 701 |
|
714 |
// TODO(dcarney): remove
|
|
715 |
V8_INLINE void Clear() { val_ = 0; }
|
|
702 |
V8_DEPRECATED("This will be removed",
|
|
703 |
V8_INLINE void Clear()) { val_ = 0; }
|
|
716 | 704 |
|
717 | 705 |
// TODO(dcarney): remove |
718 | 706 |
#ifndef V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR |
... | ... | |
724 | 712 |
V8_INLINE T* operator*() const { return val_; } |
725 | 713 |
|
726 | 714 |
private: |
715 |
friend class Isolate; |
|
727 | 716 |
friend class Utils; |
728 | 717 |
template<class F> friend class Handle; |
729 | 718 |
template<class F> friend class Local; |
... | ... | |
757 | 746 |
|
758 | 747 |
~HandleScope(); |
759 | 748 |
|
760 |
/** |
|
761 |
* Closes the handle scope and returns the value as a handle in the |
|
762 |
* previous scope, which is the new current scope after the call. |
|
763 |
*/ |
|
764 |
template <class T> Local<T> Close(Handle<T> value); |
|
749 |
template <class T> |
|
750 |
V8_DEPRECATED("Use EscapableHandleScope::Escape instead", |
|
751 |
Local<T> Close(Handle<T> value)); |
|
765 | 752 |
|
766 | 753 |
/** |
767 | 754 |
* Counts the number of allocated handles. |
768 | 755 |
*/ |
769 | 756 |
static int NumberOfHandles(); |
770 | 757 |
|
758 |
private: |
|
771 | 759 |
/** |
772 | 760 |
* Creates a new handle with the given value. |
773 | 761 |
*/ |
774 |
static internal::Object** CreateHandle(internal::Object* value); |
|
775 | 762 |
static internal::Object** CreateHandle(internal::Isolate* isolate, |
776 | 763 |
internal::Object* value); |
777 |
// Faster version, uses HeapObject to obtain the current Isolate. |
|
778 |
static internal::Object** CreateHandle(internal::HeapObject* value); |
|
764 |
// Uses HeapObject to obtain the current Isolate. |
|
765 |
static internal::Object** CreateHandle(internal::HeapObject* heap_object, |
|
766 |
internal::Object* value); |
|
767 |
|
|
768 |
V8_INLINE HandleScope() {} |
|
769 |
void Initialize(Isolate* isolate); |
|
779 | 770 |
|
780 |
private: |
|
781 | 771 |
// Make it hard to create heap-allocated or illegal handle scopes by |
782 | 772 |
// disallowing certain operations. |
783 | 773 |
HandleScope(const HandleScope&); |
... | ... | |
798 | 788 |
} |
799 | 789 |
}; |
800 | 790 |
|
801 |
void Initialize(Isolate* isolate); |
|
802 | 791 |
void Leave(); |
803 | 792 |
|
804 | 793 |
internal::Isolate* isolate_; |
805 | 794 |
internal::Object** prev_next_; |
806 | 795 |
internal::Object** prev_limit_; |
807 | 796 |
|
797 |
// TODO(dcarney): remove this field |
|
808 | 798 |
// Allow for the active closing of HandleScopes which allows to pass a handle |
809 | 799 |
// from the HandleScope being closed to the next top most HandleScope. |
810 | 800 |
bool is_closed_; |
811 | 801 |
internal::Object** RawClose(internal::Object** value); |
812 | 802 |
|
813 | 803 |
friend class ImplementationUtilities; |
804 |
friend class EscapableHandleScope; |
|
805 |
template<class F> friend class Handle; |
|
806 |
template<class F> friend class Local; |
|
807 |
friend class Object; |
|
808 |
friend class Context; |
|
809 |
}; |
|
810 |
|
|
811 |
|
|
812 |
/** |
|
813 |
* A HandleScope which first allocates a handle in the current scope |
|
814 |
* which will be later filled with the escape value. |
|
815 |
*/ |
|
816 |
class V8_EXPORT EscapableHandleScope : public HandleScope { |
|
817 |
public: |
|
818 |
EscapableHandleScope(Isolate* isolate); |
|
819 |
V8_INLINE ~EscapableHandleScope() {} |
|
820 |
|
|
821 |
/** |
|
822 |
* Pushes the value into the previous scope and returns a handle to it. |
|
823 |
* Cannot be called twice. |
|
824 |
*/ |
|
825 |
template <class T> |
|
826 |
V8_INLINE Local<T> Escape(Local<T> value) { |
|
827 |
internal::Object** slot = |
|
828 |
Escape(reinterpret_cast<internal::Object**>(*value)); |
|
829 |
return Local<T>(reinterpret_cast<T*>(slot)); |
|
830 |
} |
|
831 |
|
|
832 |
private: |
|
833 |
internal::Object** Escape(internal::Object** escape_value); |
|
834 |
|
|
835 |
// Make it hard to create heap-allocated or illegal handle scopes by |
|
836 |
// disallowing certain operations. |
|
837 |
EscapableHandleScope(const EscapableHandleScope&); |
|
838 |
void operator=(const EscapableHandleScope&); |
|
839 |
void* operator new(size_t size); |
|
840 |
void operator delete(void*, size_t); |
|
841 |
|
|
842 |
internal::Object** escape_slot_; |
|
814 | 843 |
}; |
815 | 844 |
|
816 | 845 |
|
... | ... | |
857 | 886 |
* \param input Pointer to UTF-8 script source code. |
858 | 887 |
* \param length Length of UTF-8 script source code. |
859 | 888 |
*/ |
860 |
static ScriptData* PreCompile(const char* input, int length); |
|
889 |
static ScriptData* PreCompile(Isolate* isolate, |
|
890 |
const char* input, |
|
891 |
int length); |
|
861 | 892 |
|
862 | 893 |
/** |
863 | 894 |
* Pre-compiles the specified script (context-independent). |
... | ... | |
1009 | 1040 |
|
1010 | 1041 |
/** |
1011 | 1042 |
* Returns the script id value. |
1012 |
* DEPRECATED: Please use GetId(). |
|
1013 | 1043 |
*/ |
1014 |
Local<Value> Id();
|
|
1044 |
V8_DEPRECATED("Use GetId instead", Local<Value> Id());
|
|
1015 | 1045 |
|
1016 | 1046 |
/** |
1017 | 1047 |
* Returns the script id. |
... | ... | |
1463 | 1493 |
/** JS == */ |
1464 | 1494 |
bool Equals(Handle<Value> that) const; |
1465 | 1495 |
bool StrictEquals(Handle<Value> that) const; |
1496 |
bool SameValue(Handle<Value> that) const; |
|
1466 | 1497 |
|
1467 | 1498 |
template <class T> V8_INLINE static Value* Cast(T* value); |
1468 | 1499 |
|
... | ... | |
1516 | 1547 |
int Utf8Length() const; |
1517 | 1548 |
|
1518 | 1549 |
/** |
1519 |
* This function is no longer useful. |
|
1520 |
*/ |
|
1521 |
V8_DEPRECATED(V8_INLINE bool MayContainNonAscii() const) { return true; } |
|
1522 |
|
|
1523 |
/** |
|
1524 | 1550 |
* Returns whether this string is known to contain only one byte data. |
1525 | 1551 |
* Does not read the string. |
1526 | 1552 |
* False negatives are possible. |
... | ... | |
1570 | 1596 |
int start = 0, |
1571 | 1597 |
int length = -1, |
1572 | 1598 |
int options = NO_OPTIONS) const; |
1573 |
// ASCII characters. |
|
1574 |
V8_DEPRECATED(int WriteAscii(char* buffer, |
|
1575 |
int start = 0, |
|
1576 |
int length = -1, |
|
1577 |
int options = NO_OPTIONS) const); |
|
1578 | 1599 |
// One byte characters. |
1579 | 1600 |
int WriteOneByte(uint8_t* buffer, |
1580 | 1601 |
int start = 0, |
... | ... | |
1705 | 1726 |
|
1706 | 1727 |
V8_INLINE static String* Cast(v8::Value* obj); |
1707 | 1728 |
|
1708 |
// TODO(dcarney): deprecate |
|
1709 | 1729 |
/** |
1710 | 1730 |
* Allocates a new string from either UTF-8 encoded or ASCII data. |
1711 | 1731 |
* The second parameter 'length' gives the buffer length. If omitted, |
1712 | 1732 |
* the function calls 'strlen' to determine the buffer length. |
1713 | 1733 |
*/ |
1714 |
V8_INLINE static Local<String> New(const char* data, int length = -1); |
|
1734 |
V8_DEPRECATED( |
|
1735 |
"Use NewFromOneByte instead", |
|
1736 |
V8_INLINE static Local<String> New(const char* data, int length = -1)); |
|
1715 | 1737 |
|
1716 |
// TODO(dcarney): deprecate |
|
1717 | 1738 |
/** Allocates a new string from 16-bit character codes.*/ |
1718 |
V8_INLINE static Local<String> New(const uint16_t* data, int length = -1); |
|
1739 |
V8_DEPRECATED( |
|
1740 |
"Use NewFromTwoByte instead", |
|
1741 |
V8_INLINE static Local<String> New( |
|
1742 |
const uint16_t* data, int length = -1)); |
|
1719 | 1743 |
|
1720 |
// TODO(dcarney): deprecate |
|
1721 | 1744 |
/** |
1722 | 1745 |
* Creates an internalized string (historically called a "symbol", |
1723 | 1746 |
* not to be confused with ES6 symbols). Returns one if it exists already. |
1724 | 1747 |
*/ |
1725 |
V8_INLINE static Local<String> NewSymbol(const char* data, int length = -1); |
|
1748 |
V8_DEPRECATED( |
|
1749 |
"Use NewFromUtf8 instead", |
|
1750 |
V8_INLINE static Local<String> NewSymbol( |
|
1751 |
const char* data, int length = -1)); |
|
1726 | 1752 |
|
1727 | 1753 |
enum NewStringType { |
1728 | 1754 |
kNormalString, kInternalizedString, kUndetectableString |
... | ... | |
1801 | 1827 |
*/ |
1802 | 1828 |
bool CanMakeExternal(); |
1803 | 1829 |
|
1804 |
// TODO(dcarney): deprecate |
|
1805 | 1830 |
/** Creates an undetectable string from the supplied ASCII or UTF-8 data.*/ |
1806 |
V8_INLINE static Local<String> NewUndetectable(const char* data, |
|
1807 |
int length = -1); |
|
1831 |
V8_DEPRECATED( |
|
1832 |
"Use NewFromUtf8 instead", |
|
1833 |
V8_INLINE static Local<String> NewUndetectable(const char* data, |
|
1834 |
int length = -1)); |
|
1808 | 1835 |
|
1809 |
// TODO(dcarney): deprecate |
|
1810 | 1836 |
/** Creates an undetectable string from the supplied 16-bit character codes.*/ |
1811 |
V8_INLINE static Local<String> NewUndetectable(const uint16_t* data, |
|
1812 |
int length = -1); |
|
1837 |
V8_DEPRECATED( |
|
1838 |
"Use NewFromTwoByte instead", |
|
1839 |
V8_INLINE static Local<String> NewUndetectable(const uint16_t* data, |
|
1840 |
int length = -1)); |
|
1813 | 1841 |
|
1814 | 1842 |
/** |
1815 | 1843 |
* Converts an object to a UTF-8-encoded character array. Useful if |
... | ... | |
1843 | 1871 |
*/ |
1844 | 1872 |
class V8_EXPORT AsciiValue { |
1845 | 1873 |
public: |
1846 |
// TODO(dcarney): deprecate
|
|
1847 |
explicit AsciiValue(Handle<v8::Value> obj);
|
|
1874 |
V8_DEPRECATED("Use Utf8Value instead",
|
|
1875 |
explicit AsciiValue(Handle<v8::Value> obj));
|
|
1848 | 1876 |
~AsciiValue(); |
1849 | 1877 |
char* operator*() { return str_; } |
1850 | 1878 |
const char* operator*() const { return str_; } |
... | ... | |
2265 | 2293 |
* Call an Object as a function if a callback is set by the |
2266 | 2294 |
* ObjectTemplate::SetCallAsFunctionHandler method. |
2267 | 2295 |
*/ |
2268 |
Local<Value> CallAsFunction(Handle<Object> recv,
|
|
2296 |
Local<Value> CallAsFunction(Handle<Value> recv,
|
|
2269 | 2297 |
int argc, |
2270 | 2298 |
Handle<Value> argv[]); |
2271 | 2299 |
|
... | ... | |
2364 | 2392 |
V8_INLINE Isolate* GetIsolate() const; |
2365 | 2393 |
V8_INLINE ReturnValue<T> GetReturnValue() const; |
2366 | 2394 |
// This shouldn't be public, but the arm compiler needs it. |
2367 |
static const int kArgsLength = 6;
|
|
2395 |
static const int kArgsLength = 7;
|
|
2368 | 2396 |
|
2369 | 2397 |
protected: |
2370 | 2398 |
friend class internal::FunctionCallbackArguments; |
2371 | 2399 |
friend class internal::CustomArguments<FunctionCallbackInfo>; |
2372 |
static const int kReturnValueIndex = 0; |
|
2373 |
static const int kReturnValueDefaultValueIndex = -1; |
|
2374 |
static const int kIsolateIndex = -2; |
|
2375 |
static const int kDataIndex = -3; |
|
2376 |
static const int kCalleeIndex = -4; |
|
2377 |
static const int kHolderIndex = -5; |
|
2400 |
static const int kHolderIndex = 0; |
|
2401 |
static const int kIsolateIndex = 1; |
|
2402 |
static const int kReturnValueDefaultValueIndex = 2; |
|
2403 |
static const int kReturnValueIndex = 3; |
|
2404 |
static const int kDataIndex = 4; |
|
2405 |
static const int kCalleeIndex = 5; |
|
2406 |
static const int kContextSaveIndex = 6; |
|
2378 | 2407 |
|
2379 | 2408 |
V8_INLINE FunctionCallbackInfo(internal::Object** implicit_args, |
2380 | 2409 |
internal::Object** values, |
... | ... | |
2406 | 2435 |
friend class MacroAssembler; |
2407 | 2436 |
friend class internal::PropertyCallbackArguments; |
2408 | 2437 |
friend class internal::CustomArguments<PropertyCallbackInfo>; |
2409 |
static const int kThisIndex = 0;
|
|
2410 |
static const int kDataIndex = -1;
|
|
2411 |
static const int kReturnValueIndex = -2;
|
|
2412 |
static const int kReturnValueDefaultValueIndex = -3;
|
|
2413 |
static const int kIsolateIndex = -4;
|
|
2414 |
static const int kHolderIndex = -5;
|
|
2438 |
static const int kHolderIndex = 0;
|
|
2439 |
static const int kIsolateIndex = 1;
|
|
2440 |
static const int kReturnValueDefaultValueIndex = 2;
|
|
2441 |
static const int kReturnValueIndex = 3;
|
|
2442 |
static const int kDataIndex = 4;
|
|
2443 |
static const int kThisIndex = 5;
|
|
2415 | 2444 |
|
2416 | 2445 |
V8_INLINE PropertyCallbackInfo(internal::Object** args) : args_(args) {} |
2417 | 2446 |
internal::Object** args_; |
... | ... | |
2437 | 2466 |
|
2438 | 2467 |
Local<Object> NewInstance() const; |
2439 | 2468 |
Local<Object> NewInstance(int argc, Handle<Value> argv[]) const; |
2440 |
Local<Value> Call(Handle<Object> recv, int argc, Handle<Value> argv[]);
|
|
2469 |
Local<Value> Call(Handle<Value> recv, int argc, Handle<Value> argv[]);
|
|
2441 | 2470 |
void SetName(Handle<String> name); |
2442 | 2471 |
Handle<Value> GetName() const; |
2443 | 2472 |
|
... | ... | |
2450 | 2479 |
Handle<Value> GetInferredName() const; |
2451 | 2480 |
|
2452 | 2481 |
/** |
2482 |
* User-defined name assigned to the "displayName" property of this function. |
|
2483 |
* Used to facilitate debugging and profiling of JavaScript code. |
|
2484 |
*/ |
|
2485 |
Handle<Value> GetDisplayName() const; |
|
2486 |
|
|
2487 |
/** |
|
2453 | 2488 |
* Returns zero based line number of function body and |
2454 | 2489 |
* kLineOffsetNotFound if no information available. |
2455 | 2490 |
*/ |
... | ... | |
2461 | 2496 |
int GetScriptColumnNumber() const; |
2462 | 2497 |
|
2463 | 2498 |
/** |
2499 |
* Tells whether this function is builtin. |
|
2500 |
*/ |
|
2501 |
bool IsBuiltin() const; |
|
2502 |
|
|
2503 |
/** |
|
2464 | 2504 |
* Returns scriptId object. |
2465 |
* DEPRECATED: use ScriptId() instead. |
|
2466 | 2505 |
*/ |
2467 |
Handle<Value> GetScriptId() const;
|
|
2506 |
V8_DEPRECATED("Use ScriptId instead", Handle<Value> GetScriptId()) const;
|
|
2468 | 2507 |
|
2469 | 2508 |
/** |
2470 | 2509 |
* Returns scriptId. |
... | ... | |
2627 | 2666 |
* Size of a view in bytes. |
2628 | 2667 |
*/ |
2629 | 2668 |
size_t ByteLength(); |
2630 |
/** |
|
2631 |
* Base address of a view. |
|
2632 |
*/ |
|
2633 |
void* BaseAddress(); |
|
2634 | 2669 |
|
2635 | 2670 |
V8_INLINE static ArrayBufferView* Cast(Value* obj); |
2636 | 2671 |
|
... | ... | |
2830 | 2865 |
public: |
2831 | 2866 |
static Local<Value> New(double time); |
2832 | 2867 |
|
2833 |
// Deprecated, use Date::ValueOf() instead.
|
|
2834 |
// TODO(svenpanne) Actually deprecate when Chrome is adapted.
|
|
2835 |
double NumberValue() const { return ValueOf(); }
|
|
2868 |
V8_DEPRECATED(
|
|
2869 |
"Use ValueOf instead",
|
|
2870 |
double NumberValue()) const { return ValueOf(); }
|
|
2836 | 2871 |
|
2837 | 2872 |
/** |
2838 | 2873 |
* A specialization of Value::NumberValue that is more efficient |
... | ... | |
2868 | 2903 |
public: |
2869 | 2904 |
static Local<Value> New(double value); |
2870 | 2905 |
|
2871 |
// Deprecated, use NumberObject::ValueOf() instead.
|
|
2872 |
// TODO(svenpanne) Actually deprecate when Chrome is adapted.
|
|
2873 |
double NumberValue() const { return ValueOf(); }
|
|
2906 |
V8_DEPRECATED(
|
|
2907 |
"Use ValueOf instead",
|
|
2908 |
double NumberValue()) const { return ValueOf(); }
|
|
2874 | 2909 |
|
2875 | 2910 |
/** |
2876 | 2911 |
* Returns the Number held by the object. |
... | ... | |
2891 | 2926 |
public: |
2892 | 2927 |
static Local<Value> New(bool value); |
2893 | 2928 |
|
2894 |
// Deprecated, use BooleanObject::ValueOf() instead.
|
|
2895 |
// TODO(svenpanne) Actually deprecate when Chrome is adapted.
|
|
2896 |
bool BooleanValue() const { return ValueOf(); }
|
|
2929 |
V8_DEPRECATED(
|
|
2930 |
"Use ValueOf instead",
|
|
2931 |
bool BooleanValue()) const { return ValueOf(); }
|
|
2897 | 2932 |
|
2898 | 2933 |
/** |
2899 | 2934 |
* Returns the Boolean held by the object. |
... | ... | |
2914 | 2949 |
public: |
2915 | 2950 |
static Local<Value> New(Handle<String> value); |
2916 | 2951 |
|
2917 |
// Deprecated, use StringObject::ValueOf() instead.
|
|
2918 |
// TODO(svenpanne) Actually deprecate when Chrome is adapted.
|
|
2919 |
Local<String> StringValue() const { return ValueOf(); }
|
|
2952 |
V8_DEPRECATED(
|
|
2953 |
"Use ValueOf instead",
|
|
2954 |
Local<String> StringValue()) const { return ValueOf(); }
|
|
2920 | 2955 |
|
2921 | 2956 |
/** |
2922 | 2957 |
* Returns the String held by the object. |
... | ... | |
2939 | 2974 |
public: |
2940 | 2975 |
static Local<Value> New(Isolate* isolate, Handle<Symbol> value); |
2941 | 2976 |
|
2942 |
// Deprecated, use SymbolObject::ValueOf() instead.
|
|
2943 |
// TODO(svenpanne) Actually deprecate when Chrome is adapted.
|
|
2944 |
Local<Symbol> SymbolValue() const { return ValueOf(); }
|
|
2977 |
V8_DEPRECATED(
|
|
2978 |
"Use ValueOf instead",
|
|
2979 |
Local<Symbol> SymbolValue()) const { return ValueOf(); }
|
|
2945 | 2980 |
|
2946 | 2981 |
/** |
2947 | 2982 |
* Returns the Symbol held by the object. |
... | ... | |
3744 | 3779 |
uint32_t* stack_limit() const { return stack_limit_; } |
3745 | 3780 |
// Sets an address beyond which the VM's stack may not grow. |
3746 | 3781 |
void set_stack_limit(uint32_t* value) { stack_limit_ = value; } |
Also available in: Unified diff