| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <limits> | 6 #include <limits> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 5503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5514 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 5514 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
| 5515 | 5515 |
| 5516 if (object->IsJSFunction()) { | 5516 if (object->IsJSFunction()) { |
| 5517 JSFunction* func = JSFunction::cast(*object); | 5517 JSFunction* func = JSFunction::cast(*object); |
| 5518 func->shared()->set_inline_builtin(true); | 5518 func->shared()->set_inline_builtin(true); |
| 5519 } | 5519 } |
| 5520 return isolate->heap()->undefined_value(); | 5520 return isolate->heap()->undefined_value(); |
| 5521 } | 5521 } |
| 5522 | 5522 |
| 5523 | 5523 |
| 5524 RUNTIME_FUNCTION(Runtime_DisableOptimisticOptimizations) { |
| 5525 SealHandleScope shs(isolate); |
| 5526 RUNTIME_ASSERT(args.length() == 1); |
| 5527 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
| 5528 |
| 5529 if (object->IsSharedFunctionInfo()) { |
| 5530 SharedFunctionInfo::cast(*object)->disable_optimistic_optimizations(); |
| 5531 } |
| 5532 return isolate->heap()->undefined_value(); |
| 5533 } |
| 5534 |
| 5535 |
| 5524 RUNTIME_FUNCTION(Runtime_StoreArrayLiteralElement) { | 5536 RUNTIME_FUNCTION(Runtime_StoreArrayLiteralElement) { |
| 5525 HandleScope scope(isolate); | 5537 HandleScope scope(isolate); |
| 5526 RUNTIME_ASSERT(args.length() == 5); | 5538 RUNTIME_ASSERT(args.length() == 5); |
| 5527 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); | 5539 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); |
| 5528 CONVERT_SMI_ARG_CHECKED(store_index, 1); | 5540 CONVERT_SMI_ARG_CHECKED(store_index, 1); |
| 5529 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); | 5541 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); |
| 5530 CONVERT_ARG_HANDLE_CHECKED(FixedArray, literals, 3); | 5542 CONVERT_ARG_HANDLE_CHECKED(FixedArray, literals, 3); |
| 5531 CONVERT_SMI_ARG_CHECKED(literal_index, 4); | 5543 CONVERT_SMI_ARG_CHECKED(literal_index, 4); |
| 5532 | 5544 |
| 5533 Object* raw_literal_cell = literals->get(literal_index); | 5545 Object* raw_literal_cell = literals->get(literal_index); |
| (...skipping 9610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15144 } | 15156 } |
| 15145 return NULL; | 15157 return NULL; |
| 15146 } | 15158 } |
| 15147 | 15159 |
| 15148 | 15160 |
| 15149 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15161 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
| 15150 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15162 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 15151 } | 15163 } |
| 15152 | 15164 |
| 15153 } } // namespace v8::internal | 15165 } } // namespace v8::internal |
| OLD | NEW |