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

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

Issue 2512463002: Revert of Refactor SharedFunctionInfo::IsBuiltin. (Closed)
Patch Set: Created 4 years, 1 month 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/runtime/runtime-debug.cc ('k') | src/runtime/runtime-scopes.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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 Handle<String> RenderCallSite(Isolate* isolate, Handle<Object> object) { 389 Handle<String> RenderCallSite(Isolate* isolate, Handle<Object> object) {
390 MessageLocation location; 390 MessageLocation location;
391 if (ComputeLocation(isolate, &location)) { 391 if (ComputeLocation(isolate, &location)) {
392 Zone zone(isolate->allocator(), ZONE_NAME); 392 Zone zone(isolate->allocator(), ZONE_NAME);
393 std::unique_ptr<ParseInfo> info( 393 std::unique_ptr<ParseInfo> info(
394 location.function()->shared()->is_function() 394 location.function()->shared()->is_function()
395 ? new ParseInfo(&zone, handle(location.function()->shared())) 395 ? new ParseInfo(&zone, handle(location.function()->shared()))
396 : new ParseInfo(&zone, location.script())); 396 : new ParseInfo(&zone, location.script()));
397 if (Parser::ParseStatic(info.get())) { 397 if (Parser::ParseStatic(info.get())) {
398 CallPrinter printer(isolate, 398 CallPrinter printer(isolate, location.function()->shared()->IsBuiltin());
399 location.function()->shared()->IsUserJavaScript());
400 Handle<String> str = printer.Print(info->literal(), location.start_pos()); 399 Handle<String> str = printer.Print(info->literal(), location.start_pos());
401 if (str->length() > 0) return str; 400 if (str->length() > 0) return str;
402 } else { 401 } else {
403 isolate->clear_pending_exception(); 402 isolate->clear_pending_exception();
404 } 403 }
405 } 404 }
406 return Object::TypeOf(isolate, object); 405 return Object::TypeOf(isolate, object);
407 } 406 }
408 407
409 } // namespace 408 } // namespace
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 533
535 RUNTIME_FUNCTION(Runtime_Typeof) { 534 RUNTIME_FUNCTION(Runtime_Typeof) {
536 HandleScope scope(isolate); 535 HandleScope scope(isolate);
537 DCHECK_EQ(1, args.length()); 536 DCHECK_EQ(1, args.length());
538 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 537 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
539 return *Object::TypeOf(isolate, object); 538 return *Object::TypeOf(isolate, object);
540 } 539 }
541 540
542 } // namespace internal 541 } // namespace internal
543 } // namespace v8 542 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/runtime/runtime-scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698