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

Side by Side Diff: src/runtime/runtime-internal.cc

Issue 2685543003: Revert of Reland: [Parse] ParseInfo owns the parsing Zone. (Closed)
Patch Set: Created 3 years, 10 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 | « src/parsing/parse-info.cc ('k') | test/cctest/asmjs/test-asm-typer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 return true; 345 return true;
346 } 346 }
347 } 347 }
348 return false; 348 return false;
349 } 349 }
350 350
351 351
352 Handle<String> RenderCallSite(Isolate* isolate, Handle<Object> object) { 352 Handle<String> RenderCallSite(Isolate* isolate, Handle<Object> object) {
353 MessageLocation location; 353 MessageLocation location;
354 if (ComputeLocation(isolate, &location)) { 354 if (ComputeLocation(isolate, &location)) {
355 std::unique_ptr<ParseInfo> info(new ParseInfo(location.shared())); 355 Zone zone(isolate->allocator(), ZONE_NAME);
356 std::unique_ptr<ParseInfo> info(new ParseInfo(&zone, location.shared()));
356 if (parsing::ParseAny(info.get())) { 357 if (parsing::ParseAny(info.get())) {
357 CallPrinter printer(isolate, location.shared()->IsUserJavaScript()); 358 CallPrinter printer(isolate, location.shared()->IsUserJavaScript());
358 Handle<String> str = printer.Print(info->literal(), location.start_pos()); 359 Handle<String> str = printer.Print(info->literal(), location.start_pos());
359 if (str->length() > 0) return str; 360 if (str->length() > 0) return str;
360 } else { 361 } else {
361 isolate->clear_pending_exception(); 362 isolate->clear_pending_exception();
362 } 363 }
363 } 364 }
364 return Object::TypeOf(isolate, object); 365 return Object::TypeOf(isolate, object);
365 } 366 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 HandleScope scope(isolate); 493 HandleScope scope(isolate);
493 DCHECK_EQ(1, args.length()); 494 DCHECK_EQ(1, args.length());
494 CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0); 495 CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0);
495 Handle<JSObject> global_proxy(target->global_proxy(), isolate); 496 Handle<JSObject> global_proxy(target->global_proxy(), isolate);
496 return *isolate->factory()->ToBoolean( 497 return *isolate->factory()->ToBoolean(
497 Builtins::AllowDynamicFunction(isolate, target, global_proxy)); 498 Builtins::AllowDynamicFunction(isolate, target, global_proxy));
498 } 499 }
499 500
500 } // namespace internal 501 } // namespace internal
501 } // namespace v8 502 } // namespace v8
OLDNEW
« no previous file with comments | « src/parsing/parse-info.cc ('k') | test/cctest/asmjs/test-asm-typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698