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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, location.function()->shared()->IsBuiltin()); | 398 CallPrinter printer(isolate, |
| 399 location.function()->shared()->IsUserJavaScript()); |
399 Handle<String> str = printer.Print(info->literal(), location.start_pos()); | 400 Handle<String> str = printer.Print(info->literal(), location.start_pos()); |
400 if (str->length() > 0) return str; | 401 if (str->length() > 0) return str; |
401 } else { | 402 } else { |
402 isolate->clear_pending_exception(); | 403 isolate->clear_pending_exception(); |
403 } | 404 } |
404 } | 405 } |
405 return Object::TypeOf(isolate, object); | 406 return Object::TypeOf(isolate, object); |
406 } | 407 } |
407 | 408 |
408 } // namespace | 409 } // namespace |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 | 534 |
534 RUNTIME_FUNCTION(Runtime_Typeof) { | 535 RUNTIME_FUNCTION(Runtime_Typeof) { |
535 HandleScope scope(isolate); | 536 HandleScope scope(isolate); |
536 DCHECK_EQ(1, args.length()); | 537 DCHECK_EQ(1, args.length()); |
537 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 538 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
538 return *Object::TypeOf(isolate, object); | 539 return *Object::TypeOf(isolate, object); |
539 } | 540 } |
540 | 541 |
541 } // namespace internal | 542 } // namespace internal |
542 } // namespace v8 | 543 } // namespace v8 |
OLD | NEW |