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

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

Issue 2406623002: Revert of [parser] Deprecate ParseInfo constructor taking closure. (Closed)
Patch Set: Created 4 years, 2 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/compiler/function-tester.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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 return false; 443 return false;
444 } 444 }
445 445
446 446
447 Handle<String> RenderCallSite(Isolate* isolate, Handle<Object> object) { 447 Handle<String> RenderCallSite(Isolate* isolate, Handle<Object> object) {
448 MessageLocation location; 448 MessageLocation location;
449 if (ComputeLocation(isolate, &location)) { 449 if (ComputeLocation(isolate, &location)) {
450 Zone zone(isolate->allocator()); 450 Zone zone(isolate->allocator());
451 std::unique_ptr<ParseInfo> info( 451 std::unique_ptr<ParseInfo> info(
452 location.function()->shared()->is_function() 452 location.function()->shared()->is_function()
453 ? new ParseInfo(&zone, handle(location.function()->shared())) 453 ? new ParseInfo(&zone, location.function())
454 : new ParseInfo(&zone, location.script())); 454 : new ParseInfo(&zone, location.script()));
455 if (Parser::ParseStatic(info.get())) { 455 if (Parser::ParseStatic(info.get())) {
456 CallPrinter printer(isolate, location.function()->shared()->IsBuiltin()); 456 CallPrinter printer(isolate, location.function()->shared()->IsBuiltin());
457 Handle<String> str = printer.Print(info->literal(), location.start_pos()); 457 Handle<String> str = printer.Print(info->literal(), location.start_pos());
458 if (str->length() > 0) return str; 458 if (str->length() > 0) return str;
459 } else { 459 } else {
460 isolate->clear_pending_exception(); 460 isolate->clear_pending_exception();
461 } 461 }
462 } 462 }
463 return Object::TypeOf(isolate, object); 463 return Object::TypeOf(isolate, object);
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 621
622 RUNTIME_FUNCTION(Runtime_Typeof) { 622 RUNTIME_FUNCTION(Runtime_Typeof) {
623 HandleScope scope(isolate); 623 HandleScope scope(isolate);
624 DCHECK_EQ(1, args.length()); 624 DCHECK_EQ(1, args.length());
625 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 625 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
626 return *Object::TypeOf(isolate, object); 626 return *Object::TypeOf(isolate, object);
627 } 627 }
628 628
629 } // namespace internal 629 } // namespace internal
630 } // namespace v8 630 } // namespace v8
OLDNEW
« no previous file with comments | « src/parsing/parse-info.cc ('k') | test/cctest/compiler/function-tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698