Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: src/api.cc

Issue 2342443004: Only pass the outer scope info with ParseInfo (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/ast/scopes.h » ('j') | src/ast/scopes.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after
2214 script->set_column_offset( 2214 script->set_column_offset(
2215 static_cast<int>(origin.ResourceColumnOffset()->Value())); 2215 static_cast<int>(origin.ResourceColumnOffset()->Value()));
2216 } 2216 }
2217 script->set_origin_options(origin.Options()); 2217 script->set_origin_options(origin.Options());
2218 if (!origin.SourceMapUrl().IsEmpty()) { 2218 if (!origin.SourceMapUrl().IsEmpty()) {
2219 script->set_source_mapping_url( 2219 script->set_source_mapping_url(
2220 *Utils::OpenHandle(*(origin.SourceMapUrl()))); 2220 *Utils::OpenHandle(*(origin.SourceMapUrl())));
2221 } 2221 }
2222 2222
2223 source->info->set_script(script); 2223 source->info->set_script(script);
2224 source->info->set_context(isolate->native_context());
2225 2224
2226 // Create a canonical handle scope before internalizing parsed values if 2225 // Create a canonical handle scope before internalizing parsed values if
2227 // compiling bytecode. This is required for off-thread bytecode generation. 2226 // compiling bytecode. This is required for off-thread bytecode generation.
2228 std::unique_ptr<i::CanonicalHandleScope> canonical; 2227 std::unique_ptr<i::CanonicalHandleScope> canonical;
2229 if (i::FLAG_ignition) canonical.reset(new i::CanonicalHandleScope(isolate)); 2228 if (i::FLAG_ignition) canonical.reset(new i::CanonicalHandleScope(isolate));
2230 2229
2231 // Do the parsing tasks which need to be done on the main thread. This will 2230 // Do the parsing tasks which need to be done on the main thread. This will
2232 // also handle parse errors. 2231 // also handle parse errors.
2233 source->parser->Internalize(isolate, script, 2232 source->parser->Internalize(isolate, script,
2234 source->info->literal() == nullptr); 2233 source->info->literal() == nullptr);
(...skipping 7046 matching lines...) Expand 10 before | Expand all | Expand 10 after
9281 Address callback_address = 9280 Address callback_address =
9282 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9281 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9283 VMState<EXTERNAL> state(isolate); 9282 VMState<EXTERNAL> state(isolate);
9284 ExternalCallbackScope call_scope(isolate, callback_address); 9283 ExternalCallbackScope call_scope(isolate, callback_address);
9285 callback(info); 9284 callback(info);
9286 } 9285 }
9287 9286
9288 9287
9289 } // namespace internal 9288 } // namespace internal
9290 } // namespace v8 9289 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/ast/scopes.h » ('j') | src/ast/scopes.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698