| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // Set length and elements on the array. | 238 // Set length and elements on the array. |
| 239 array->set_elements(FixedArray::cast(obj)); | 239 array->set_elements(FixedArray::cast(obj)); |
| 240 array->set_length(len); | 240 array->set_length(len); |
| 241 | 241 |
| 242 return array; | 242 return array; |
| 243 } | 243 } |
| 244 | 244 |
| 245 | 245 |
| 246 static Object* AllocateJSArray(Heap* heap) { | 246 static Object* AllocateJSArray(Heap* heap) { |
| 247 JSFunction* array_function = | 247 JSFunction* array_function = |
| 248 ISOLATE_FROM_HEAP(heap)->context()->global_context()->array_function(); | 248 heap->isolate()->context()->global_context()->array_function(); |
| 249 Object* result = heap->AllocateJSObject(array_function); | 249 Object* result = heap->AllocateJSObject(array_function); |
| 250 if (result->IsFailure()) return result; | 250 if (result->IsFailure()) return result; |
| 251 return result; | 251 return result; |
| 252 } | 252 } |
| 253 | 253 |
| 254 | 254 |
| 255 static Object* AllocateEmptyJSArray(Heap* heap) { | 255 static Object* AllocateEmptyJSArray(Heap* heap) { |
| 256 Object* result = AllocateJSArray(heap); | 256 Object* result = AllocateJSArray(heap); |
| 257 if (result->IsFailure()) return result; | 257 if (result->IsFailure()) return result; |
| 258 JSArray* result_array = JSArray::cast(result); | 258 JSArray* result_array = JSArray::cast(result); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 return true; | 371 return true; |
| 372 } | 372 } |
| 373 | 373 |
| 374 | 374 |
| 375 static bool IsFastElementMovingAllowed(Heap* heap, | 375 static bool IsFastElementMovingAllowed(Heap* heap, |
| 376 Object* receiver, | 376 Object* receiver, |
| 377 FixedArray** elements) { | 377 FixedArray** elements) { |
| 378 if (!IsJSArrayWithFastElements(heap, receiver, elements)) return false; | 378 if (!IsJSArrayWithFastElements(heap, receiver, elements)) return false; |
| 379 | 379 |
| 380 Context* global_context = | 380 Context* global_context = |
| 381 ISOLATE_FROM_HEAP(heap)->context()->global_context(); | 381 heap->isolate()->context()->global_context(); |
| 382 JSObject* array_proto = | 382 JSObject* array_proto = |
| 383 JSObject::cast(global_context->array_function()->prototype()); | 383 JSObject::cast(global_context->array_function()->prototype()); |
| 384 if (JSArray::cast(receiver)->GetPrototype() != array_proto) return false; | 384 if (JSArray::cast(receiver)->GetPrototype() != array_proto) return false; |
| 385 return ArrayPrototypeHasNoElements(heap, global_context, array_proto); | 385 return ArrayPrototypeHasNoElements(heap, global_context, array_proto); |
| 386 } | 386 } |
| 387 | 387 |
| 388 | 388 |
| 389 static Object* CallJsBuiltin(Isolate* isolate, | 389 static Object* CallJsBuiltin(Isolate* isolate, |
| 390 const char* name, | 390 const char* name, |
| 391 BuiltinArguments<NO_EXTRA_ARGUMENTS> args) { | 391 BuiltinArguments<NO_EXTRA_ARGUMENTS> args) { |
| (...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 if (entry->contains(pc)) { | 1580 if (entry->contains(pc)) { |
| 1581 return names_[i]; | 1581 return names_[i]; |
| 1582 } | 1582 } |
| 1583 } | 1583 } |
| 1584 } | 1584 } |
| 1585 return NULL; | 1585 return NULL; |
| 1586 } | 1586 } |
| 1587 | 1587 |
| 1588 | 1588 |
| 1589 } } // namespace v8::internal | 1589 } } // namespace v8::internal |
| OLD | NEW |