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

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

Issue 642233003: Simplify language feature management. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR feedback Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/debug-script.js » ('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/natives.h"
10 #include "src/runtime/runtime-utils.h" 11 #include "src/runtime/runtime-utils.h"
11 12
12 namespace v8 { 13 namespace v8 {
13 namespace internal { 14 namespace internal {
14 15
15 RUNTIME_FUNCTION(Runtime_DeoptimizeFunction) { 16 RUNTIME_FUNCTION(Runtime_DeoptimizeFunction) {
16 HandleScope scope(isolate); 17 HandleScope scope(isolate);
17 DCHECK(args.length() == 1); 18 DCHECK(args.length() == 1);
18 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 19 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
19 if (!function->IsOptimized()) return isolate->heap()->undefined_value(); 20 if (!function->IsOptimized()) return isolate->heap()->undefined_value();
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 DCHECK(args.length() == 1); 287 DCHECK(args.length() == 1);
287 CONVERT_ARG_HANDLE_CHECKED(String, message, 0); 288 CONVERT_ARG_HANDLE_CHECKED(String, message, 0);
288 base::OS::PrintError("abort: %s\n", message->ToCString().get()); 289 base::OS::PrintError("abort: %s\n", message->ToCString().get());
289 isolate->PrintStack(stderr); 290 isolate->PrintStack(stderr);
290 base::OS::Abort(); 291 base::OS::Abort();
291 UNREACHABLE(); 292 UNREACHABLE();
292 return NULL; 293 return NULL;
293 } 294 }
294 295
295 296
297 RUNTIME_FUNCTION(Runtime_NativeScriptsCount) {
298 DCHECK(args.length() == 0);
299 return Smi::FromInt(Natives::GetBuiltinsCount());
300 }
301
302
296 // Returns V8 version as a string. 303 // Returns V8 version as a string.
297 RUNTIME_FUNCTION(Runtime_GetV8Version) { 304 RUNTIME_FUNCTION(Runtime_GetV8Version) {
298 HandleScope scope(isolate); 305 HandleScope scope(isolate);
299 DCHECK(args.length() == 0); 306 DCHECK(args.length() == 0);
300 307
301 const char* version_string = v8::V8::GetVersion(); 308 const char* version_string = v8::V8::GetVersion();
302 309
303 return *isolate->factory()->NewStringFromAsciiChecked(version_string); 310 return *isolate->factory()->NewStringFromAsciiChecked(version_string);
304 } 311 }
305 312
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ 402 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \
396 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ 403 CONVERT_ARG_CHECKED(JSObject, obj, 0); \
397 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ 404 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \
398 } 405 }
399 406
400 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) 407 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION)
401 408
402 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION 409 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION
403 } 410 }
404 } // namespace v8::internal 411 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/debug-script.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698