| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 Handle<JSObject>::cast(object)->map()->elements_kind(); | 329 Handle<JSObject>::cast(object)->map()->elements_kind(); |
| 330 if (Map::IsValidElementsTransition(from_kind, to_kind)) { | 330 if (Map::IsValidElementsTransition(from_kind, to_kind)) { |
| 331 JSObject::TransitionElementsKind(Handle<JSObject>::cast(object), to_kind); | 331 JSObject::TransitionElementsKind(Handle<JSObject>::cast(object), to_kind); |
| 332 return object; | 332 return object; |
| 333 } | 333 } |
| 334 isolate->ThrowIllegalOperation(); | 334 isolate->ThrowIllegalOperation(); |
| 335 return MaybeHandle<Object>(); | 335 return MaybeHandle<Object>(); |
| 336 } | 336 } |
| 337 | 337 |
| 338 | 338 |
| 339 static const int kSmiLiteralMinimumLength = 1024; | |
| 340 | |
| 341 | |
| 342 MaybeHandle<Object> Runtime::CreateArrayLiteralBoilerplate( | 339 MaybeHandle<Object> Runtime::CreateArrayLiteralBoilerplate( |
| 343 Isolate* isolate, | 340 Isolate* isolate, |
| 344 Handle<FixedArray> literals, | 341 Handle<FixedArray> literals, |
| 345 Handle<FixedArray> elements) { | 342 Handle<FixedArray> elements) { |
| 346 // Create the JSArray. | 343 // Create the JSArray. |
| 347 Handle<JSFunction> constructor( | 344 Handle<JSFunction> constructor( |
| 348 JSFunction::NativeContextFromLiterals(*literals)->array_function()); | 345 JSFunction::NativeContextFromLiterals(*literals)->array_function()); |
| 349 | 346 |
| 350 PretenureFlag pretenure_flag = | 347 PretenureFlag pretenure_flag = |
| 351 isolate->heap()->InNewSpace(*literals) ? NOT_TENURED : TENURED; | 348 isolate->heap()->InNewSpace(*literals) ? NOT_TENURED : TENURED; |
| (...skipping 14594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14946 } | 14943 } |
| 14947 return NULL; | 14944 return NULL; |
| 14948 } | 14945 } |
| 14949 | 14946 |
| 14950 | 14947 |
| 14951 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 14948 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
| 14952 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 14949 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 14953 } | 14950 } |
| 14954 | 14951 |
| 14955 } } // namespace v8::internal | 14952 } } // namespace v8::internal |
| OLD | NEW |