| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |