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

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

Issue 1128113006: Add the concept of a V8 extras exports object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Was mising test-extra.js :( Created 5 years, 7 months 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.h ('k') | test/cctest/test-api.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/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
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
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
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698