| 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.h" |  | 
| 11 #include "src/runtime/runtime-utils.h" | 10 #include "src/runtime/runtime-utils.h" | 
| 12 | 11 | 
| 13 namespace v8 { | 12 namespace v8 { | 
| 14 namespace internal { | 13 namespace internal { | 
| 15 | 14 | 
| 16 RUNTIME_FUNCTION(Runtime_DeoptimizeFunction) { | 15 RUNTIME_FUNCTION(Runtime_DeoptimizeFunction) { | 
| 17   HandleScope scope(isolate); | 16   HandleScope scope(isolate); | 
| 18   DCHECK(args.length() == 1); | 17   DCHECK(args.length() == 1); | 
| 19   CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); | 18   CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); | 
| 20   if (!function->IsOptimized()) return isolate->heap()->undefined_value(); | 19   if (!function->IsOptimized()) return isolate->heap()->undefined_value(); | 
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 384     elements->set(index++, *pair);                                          \ | 383     elements->set(index++, *pair);                                          \ | 
| 385   } | 384   } | 
| 386   inline_runtime_functions = false; | 385   inline_runtime_functions = false; | 
| 387   RUNTIME_FUNCTION_LIST(ADD_ENTRY) | 386   RUNTIME_FUNCTION_LIST(ADD_ENTRY) | 
| 388   INLINE_OPTIMIZED_FUNCTION_LIST(ADD_ENTRY) | 387   INLINE_OPTIMIZED_FUNCTION_LIST(ADD_ENTRY) | 
| 389   inline_runtime_functions = true; | 388   inline_runtime_functions = true; | 
| 390   INLINE_FUNCTION_LIST(ADD_ENTRY) | 389   INLINE_FUNCTION_LIST(ADD_ENTRY) | 
| 391 #undef ADD_ENTRY | 390 #undef ADD_ENTRY | 
| 392   DCHECK_EQ(index, entry_count); | 391   DCHECK_EQ(index, entry_count); | 
| 393   Handle<JSArray> result = factory->NewJSArrayWithElements(elements); | 392   Handle<JSArray> result = factory->NewJSArrayWithElements(elements); | 
| 394   return *result; | 393   return (*result); | 
| 395 } | 394 } | 
| 396 #endif | 395 #endif | 
| 397 | 396 | 
| 398 | 397 | 
| 399 RUNTIME_FUNCTION(Runtime_HaveSameMap) { | 398 RUNTIME_FUNCTION(Runtime_HaveSameMap) { | 
| 400   SealHandleScope shs(isolate); | 399   SealHandleScope shs(isolate); | 
| 401   DCHECK(args.length() == 2); | 400   DCHECK(args.length() == 2); | 
| 402   CONVERT_ARG_CHECKED(JSObject, obj1, 0); | 401   CONVERT_ARG_CHECKED(JSObject, obj1, 0); | 
| 403   CONVERT_ARG_CHECKED(JSObject, obj2, 1); | 402   CONVERT_ARG_CHECKED(JSObject, obj2, 1); | 
| 404   return isolate->heap()->ToBoolean(obj1->map() == obj2->map()); | 403   return isolate->heap()->ToBoolean(obj1->map() == obj2->map()); | 
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 440   RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) {                        \ | 439   RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) {                        \ | 
| 441     CONVERT_ARG_CHECKED(JSObject, obj, 0);                                    \ | 440     CONVERT_ARG_CHECKED(JSObject, obj, 0);                                    \ | 
| 442     return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements());       \ | 441     return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements());       \ | 
| 443   } | 442   } | 
| 444 | 443 | 
| 445 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) | 444 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) | 
| 446 | 445 | 
| 447 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION | 446 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION | 
| 448 } | 447 } | 
| 449 }  // namespace v8::internal | 448 }  // namespace v8::internal | 
| OLD | NEW | 
|---|