| 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 // TODO(mythria): Remove this define after this flag is turned on globally | 5 // TODO(mythria): Remove this define after this flag is turned on globally |
| 6 #define V8_IMMINENT_DEPRECATION_WARNINGS | 6 #define V8_IMMINENT_DEPRECATION_WARNINGS |
| 7 | 7 |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 | 48 |
| 49 static Handle<String> MakeName(const char* str, int suffix) { | 49 static Handle<String> MakeName(const char* str, int suffix) { |
| 50 EmbeddedVector<char, 128> buffer; | 50 EmbeddedVector<char, 128> buffer; |
| 51 SNPrintF(buffer, "%s%d", str, suffix); | 51 SNPrintF(buffer, "%s%d", str, suffix); |
| 52 return MakeString(buffer.start()); | 52 return MakeString(buffer.start()); |
| 53 } | 53 } |
| 54 | 54 |
| 55 | 55 |
| 56 Handle<JSObject> GetObject(const char* name) { | 56 Handle<JSObject> GetObject(const char* name) { |
| 57 return v8::Utils::OpenHandle(*v8::Local<v8::Object>::Cast( | 57 return Handle<JSObject>::cast( |
| 58 CcTest::global() | 58 v8::Utils::OpenHandle(*v8::Local<v8::Object>::Cast( |
| 59 ->Get(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str(name)) | 59 CcTest::global() |
| 60 .ToLocalChecked())); | 60 ->Get(v8::Isolate::GetCurrent()->GetCurrentContext(), |
| 61 v8_str(name)) |
| 62 .ToLocalChecked()))); |
| 61 } | 63 } |
| 62 | 64 |
| 63 | 65 |
| 64 static double GetDoubleFieldValue(JSObject* obj, FieldIndex field_index) { | 66 static double GetDoubleFieldValue(JSObject* obj, FieldIndex field_index) { |
| 65 if (obj->IsUnboxedDoubleField(field_index)) { | 67 if (obj->IsUnboxedDoubleField(field_index)) { |
| 66 return obj->RawFastDoublePropertyAt(field_index); | 68 return obj->RawFastDoublePropertyAt(field_index); |
| 67 } else { | 69 } else { |
| 68 Object* value = obj->RawFastPropertyAt(field_index); | 70 Object* value = obj->RawFastPropertyAt(field_index); |
| 69 DCHECK(value->IsMutableHeapNumber()); | 71 DCHECK(value->IsMutableHeapNumber()); |
| 70 return HeapNumber::cast(value)->value(); | 72 return HeapNumber::cast(value)->value(); |
| (...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1604 | 1606 |
| 1605 // TODO(ishell): add respective tests for property kind reconfiguring from | 1607 // TODO(ishell): add respective tests for property kind reconfiguring from |
| 1606 // accessor field to double, once accessor fields are supported by | 1608 // accessor field to double, once accessor fields are supported by |
| 1607 // Map::ReconfigureProperty(). | 1609 // Map::ReconfigureProperty(). |
| 1608 | 1610 |
| 1609 | 1611 |
| 1610 // TODO(ishell): add respective tests for fast property removal case once | 1612 // TODO(ishell): add respective tests for fast property removal case once |
| 1611 // Map::ReconfigureProperty() supports that. | 1613 // Map::ReconfigureProperty() supports that. |
| 1612 | 1614 |
| 1613 #endif | 1615 #endif |
| OLD | NEW |