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 "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
9 #include "src/frames-inl.h" | 9 #include "src/frames-inl.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 return *isolate->factory()->NewStringFromAsciiChecked(version_string); | 391 return *isolate->factory()->NewStringFromAsciiChecked(version_string); |
392 } | 392 } |
393 | 393 |
394 | 394 |
395 RUNTIME_FUNCTION(Runtime_DisassembleFunction) { | 395 RUNTIME_FUNCTION(Runtime_DisassembleFunction) { |
396 HandleScope scope(isolate); | 396 HandleScope scope(isolate); |
397 #ifdef DEBUG | 397 #ifdef DEBUG |
398 DCHECK(args.length() == 1); | 398 DCHECK(args.length() == 1); |
399 // Get the function and make sure it is compiled. | 399 // Get the function and make sure it is compiled. |
400 CONVERT_ARG_HANDLE_CHECKED(JSFunction, func, 0); | 400 CONVERT_ARG_HANDLE_CHECKED(JSFunction, func, 0); |
401 if (!Compiler::Compile(func, KEEP_EXCEPTION)) { | 401 if (!Compiler::Compile(func, Compiler::KEEP_EXCEPTION)) { |
402 return isolate->heap()->exception(); | 402 return isolate->heap()->exception(); |
403 } | 403 } |
404 OFStream os(stdout); | 404 OFStream os(stdout); |
405 func->code()->Print(os); | 405 func->code()->Print(os); |
406 os << std::endl; | 406 os << std::endl; |
407 #endif // DEBUG | 407 #endif // DEBUG |
408 return isolate->heap()->undefined_value(); | 408 return isolate->heap()->undefined_value(); |
409 } | 409 } |
410 | 410 |
411 namespace { | 411 namespace { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ | 498 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ |
499 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ | 499 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ |
500 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ | 500 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ |
501 } | 501 } |
502 | 502 |
503 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) | 503 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) |
504 | 504 |
505 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION | 505 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION |
506 } // namespace internal | 506 } // namespace internal |
507 } // namespace v8 | 507 } // namespace v8 |
OLD | NEW |