| 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/v8.h" | 5 #include "src/v8.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/full-codegen.h" | 9 #include "src/full-codegen.h" |
| 10 #include "src/runtime/runtime-utils.h" | 10 #include "src/runtime/runtime-utils.h" |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 return NULL; | 357 return NULL; |
| 358 } | 358 } |
| 359 | 359 |
| 360 | 360 |
| 361 RUNTIME_FUNCTION(Runtime_NativeScriptsCount) { | 361 RUNTIME_FUNCTION(Runtime_NativeScriptsCount) { |
| 362 DCHECK(args.length() == 0); | 362 DCHECK(args.length() == 0); |
| 363 return Smi::FromInt(Natives::GetBuiltinsCount()); | 363 return Smi::FromInt(Natives::GetBuiltinsCount()); |
| 364 } | 364 } |
| 365 | 365 |
| 366 | 366 |
| 367 RUNTIME_FUNCTION(Runtime_NativeExtrasCount) { |
| 368 DCHECK(args.length() == 0); |
| 369 return Smi::FromInt(ExtraNatives::GetBuiltinsCount()); |
| 370 } |
| 371 |
| 372 |
| 367 // Returns V8 version as a string. | 373 // Returns V8 version as a string. |
| 368 RUNTIME_FUNCTION(Runtime_GetV8Version) { | 374 RUNTIME_FUNCTION(Runtime_GetV8Version) { |
| 369 HandleScope scope(isolate); | 375 HandleScope scope(isolate); |
| 370 DCHECK(args.length() == 0); | 376 DCHECK(args.length() == 0); |
| 371 | 377 |
| 372 const char* version_string = v8::V8::GetVersion(); | 378 const char* version_string = v8::V8::GetVersion(); |
| 373 | 379 |
| 374 return *isolate->factory()->NewStringFromAsciiChecked(version_string); | 380 return *isolate->factory()->NewStringFromAsciiChecked(version_string); |
| 375 } | 381 } |
| 376 | 382 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ | 489 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ |
| 484 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ | 490 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ |
| 485 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ | 491 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ |
| 486 } | 492 } |
| 487 | 493 |
| 488 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) | 494 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) |
| 489 | 495 |
| 490 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION | 496 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION |
| 491 } | 497 } |
| 492 } // namespace v8::internal | 498 } // namespace v8::internal |
| OLD | NEW |