| 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 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
| (...skipping 2138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2149 JSObject* initial_array_proto = JSObject::cast(*initial_array_prototype()); | 2149 JSObject* initial_array_proto = JSObject::cast(*initial_array_prototype()); |
| 2150 | 2150 |
| 2151 // Check that the array prototype hasn't been altered WRT empty elements. | 2151 // Check that the array prototype hasn't been altered WRT empty elements. |
| 2152 if (root_array_map->prototype() != initial_array_proto) return false; | 2152 if (root_array_map->prototype() != initial_array_proto) return false; |
| 2153 if (initial_array_proto->elements() != heap()->empty_fixed_array()) { | 2153 if (initial_array_proto->elements() != heap()->empty_fixed_array()) { |
| 2154 return false; | 2154 return false; |
| 2155 } | 2155 } |
| 2156 | 2156 |
| 2157 // Check that the object prototype hasn't been altered WRT empty elements. | 2157 // Check that the object prototype hasn't been altered WRT empty elements. |
| 2158 JSObject* initial_object_proto = JSObject::cast(*initial_object_prototype()); | 2158 JSObject* initial_object_proto = JSObject::cast(*initial_object_prototype()); |
| 2159 Object* root_array_map_proto = initial_array_proto->GetPrototype(); | 2159 PrototypeIterator iter(this, initial_array_proto); |
| 2160 if (root_array_map_proto != initial_object_proto) return false; | 2160 if (iter.IsAtEnd() || iter.GetCurrent() != initial_object_proto) { |
| 2161 return false; |
| 2162 } |
| 2161 if (initial_object_proto->elements() != heap()->empty_fixed_array()) { | 2163 if (initial_object_proto->elements() != heap()->empty_fixed_array()) { |
| 2162 return false; | 2164 return false; |
| 2163 } | 2165 } |
| 2164 | 2166 |
| 2165 return initial_object_proto->GetPrototype()->IsNull(); | 2167 iter.Advance(); |
| 2168 return iter.IsAtEnd(); |
| 2166 } | 2169 } |
| 2167 | 2170 |
| 2168 | 2171 |
| 2169 CodeStubInterfaceDescriptor* | 2172 CodeStubInterfaceDescriptor* |
| 2170 Isolate::code_stub_interface_descriptor(int index) { | 2173 Isolate::code_stub_interface_descriptor(int index) { |
| 2171 return code_stub_interface_descriptors_ + index; | 2174 return code_stub_interface_descriptors_ + index; |
| 2172 } | 2175 } |
| 2173 | 2176 |
| 2174 | 2177 |
| 2175 CallInterfaceDescriptor* | 2178 CallInterfaceDescriptor* |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2348 if (prev_ && prev_->Intercept(flag)) return true; | 2351 if (prev_ && prev_->Intercept(flag)) return true; |
| 2349 // Then check whether this scope intercepts. | 2352 // Then check whether this scope intercepts. |
| 2350 if ((flag & intercept_mask_)) { | 2353 if ((flag & intercept_mask_)) { |
| 2351 intercepted_flags_ |= flag; | 2354 intercepted_flags_ |= flag; |
| 2352 return true; | 2355 return true; |
| 2353 } | 2356 } |
| 2354 return false; | 2357 return false; |
| 2355 } | 2358 } |
| 2356 | 2359 |
| 2357 } } // namespace v8::internal | 2360 } } // namespace v8::internal |
| OLD | NEW |