| 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 |
| 6 #define V8_IMMINENT_DEPRECATION_WARNINGS |
| 7 |
| 5 #include <stdlib.h> | 8 #include <stdlib.h> |
| 6 #include <utility> | 9 #include <utility> |
| 7 | 10 |
| 8 #include "src/v8.h" | 11 #include "src/v8.h" |
| 9 | 12 |
| 10 #include "src/compilation-cache.h" | 13 #include "src/compilation-cache.h" |
| 11 #include "src/execution.h" | 14 #include "src/execution.h" |
| 12 #include "src/factory.h" | 15 #include "src/factory.h" |
| 13 #include "src/global-handles.h" | 16 #include "src/global-handles.h" |
| 14 #include "src/ic/ic.h" | 17 #include "src/ic/ic.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 43 | 46 |
| 44 | 47 |
| 45 static Handle<String> MakeName(const char* str, int suffix) { | 48 static Handle<String> MakeName(const char* str, int suffix) { |
| 46 EmbeddedVector<char, 128> buffer; | 49 EmbeddedVector<char, 128> buffer; |
| 47 SNPrintF(buffer, "%s%d", str, suffix); | 50 SNPrintF(buffer, "%s%d", str, suffix); |
| 48 return MakeString(buffer.start()); | 51 return MakeString(buffer.start()); |
| 49 } | 52 } |
| 50 | 53 |
| 51 | 54 |
| 52 Handle<JSObject> GetObject(const char* name) { | 55 Handle<JSObject> GetObject(const char* name) { |
| 53 return v8::Utils::OpenHandle( | 56 return v8::Utils::OpenHandle(*v8::Local<v8::Object>::Cast( |
| 54 *v8::Handle<v8::Object>::Cast(CcTest::global()->Get(v8_str(name)))); | 57 CcTest::global() |
| 58 ->Get(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str(name)) |
| 59 .ToLocalChecked())); |
| 55 } | 60 } |
| 56 | 61 |
| 57 | 62 |
| 58 static double GetDoubleFieldValue(JSObject* obj, FieldIndex field_index) { | 63 static double GetDoubleFieldValue(JSObject* obj, FieldIndex field_index) { |
| 59 if (obj->IsUnboxedDoubleField(field_index)) { | 64 if (obj->IsUnboxedDoubleField(field_index)) { |
| 60 return obj->RawFastDoublePropertyAt(field_index); | 65 return obj->RawFastDoublePropertyAt(field_index); |
| 61 } else { | 66 } else { |
| 62 Object* value = obj->RawFastPropertyAt(field_index); | 67 Object* value = obj->RawFastPropertyAt(field_index); |
| 63 DCHECK(value->IsMutableHeapNumber()); | 68 DCHECK(value->IsMutableHeapNumber()); |
| 64 return HeapNumber::cast(value)->value(); | 69 return HeapNumber::cast(value)->value(); |
| (...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1681 | 1686 |
| 1682 // TODO(ishell): add respective tests for property kind reconfiguring from | 1687 // TODO(ishell): add respective tests for property kind reconfiguring from |
| 1683 // accessor field to double, once accessor fields are supported by | 1688 // accessor field to double, once accessor fields are supported by |
| 1684 // Map::ReconfigureProperty(). | 1689 // Map::ReconfigureProperty(). |
| 1685 | 1690 |
| 1686 | 1691 |
| 1687 // TODO(ishell): add respective tests for fast property removal case once | 1692 // TODO(ishell): add respective tests for fast property removal case once |
| 1688 // Map::ReconfigureProperty() supports that. | 1693 // Map::ReconfigureProperty() supports that. |
| 1689 | 1694 |
| 1690 #endif | 1695 #endif |
| OLD | NEW |