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 "v8.h" | 8 #include "v8.h" |
9 | 9 |
10 #include "accessors.h" | 10 #include "accessors.h" |
(...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1932 obj, obj, index, access_type, &Isolate::MayIndexedAccess)) { | 1932 obj, obj, index, access_type, &Isolate::MayIndexedAccess)) { |
1933 return ACCESS_ALLOWED; | 1933 return ACCESS_ALLOWED; |
1934 } | 1934 } |
1935 | 1935 |
1936 obj->GetIsolate()->ReportFailedAccessCheck(obj, access_type); | 1936 obj->GetIsolate()->ReportFailedAccessCheck(obj, access_type); |
1937 return ACCESS_FORBIDDEN; | 1937 return ACCESS_FORBIDDEN; |
1938 } | 1938 } |
1939 | 1939 |
1940 Isolate* isolate = obj->GetIsolate(); | 1940 Isolate* isolate = obj->GetIsolate(); |
1941 LookupResult lookup(isolate); | 1941 LookupResult lookup(isolate); |
1942 obj->LocalLookup(*name, &lookup, true); | 1942 obj->LocalLookup(name, &lookup, true); |
1943 | 1943 |
1944 if (!lookup.IsProperty()) return ACCESS_ABSENT; | 1944 if (!lookup.IsProperty()) return ACCESS_ABSENT; |
1945 Handle<JSObject> holder(lookup.holder(), isolate); | 1945 Handle<JSObject> holder(lookup.holder(), isolate); |
1946 if (CheckGenericAccess<Handle<Object> >( | 1946 if (CheckGenericAccess<Handle<Object> >( |
1947 obj, holder, name, access_type, &Isolate::MayNamedAccess)) { | 1947 obj, holder, name, access_type, &Isolate::MayNamedAccess)) { |
1948 return ACCESS_ALLOWED; | 1948 return ACCESS_ALLOWED; |
1949 } | 1949 } |
1950 | 1950 |
1951 // Access check callback denied the access, but some properties | 1951 // Access check callback denied the access, but some properties |
1952 // can have a special permissions which override callbacks descision | 1952 // can have a special permissions which override callbacks descision |
1953 // (currently see v8::AccessControl). | 1953 // (currently see v8::AccessControl). |
1954 // API callbacks can have per callback access exceptions. | 1954 // API callbacks can have per callback access exceptions. |
1955 switch (lookup.type()) { | 1955 switch (lookup.type()) { |
1956 case CALLBACKS: | 1956 case CALLBACKS: |
1957 if (CheckAccessException(lookup.GetCallbackObject(), access_type)) { | 1957 if (CheckAccessException(lookup.GetCallbackObject(), access_type)) { |
1958 return ACCESS_ALLOWED; | 1958 return ACCESS_ALLOWED; |
1959 } | 1959 } |
1960 break; | 1960 break; |
1961 case INTERCEPTOR: | 1961 case INTERCEPTOR: |
1962 // If the object has an interceptor, try real named properties. | 1962 // If the object has an interceptor, try real named properties. |
1963 // Overwrite the result to fetch the correct property later. | 1963 // Overwrite the result to fetch the correct property later. |
1964 holder->LookupRealNamedProperty(*name, &lookup); | 1964 holder->LookupRealNamedProperty(name, &lookup); |
1965 if (lookup.IsProperty() && lookup.IsPropertyCallbacks()) { | 1965 if (lookup.IsProperty() && lookup.IsPropertyCallbacks()) { |
1966 if (CheckAccessException(lookup.GetCallbackObject(), access_type)) { | 1966 if (CheckAccessException(lookup.GetCallbackObject(), access_type)) { |
1967 return ACCESS_ALLOWED; | 1967 return ACCESS_ALLOWED; |
1968 } | 1968 } |
1969 } | 1969 } |
1970 break; | 1970 break; |
1971 default: | 1971 default: |
1972 break; | 1972 break; |
1973 } | 1973 } |
1974 | 1974 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2248 bool is_var = value->IsUndefined(); | 2248 bool is_var = value->IsUndefined(); |
2249 bool is_const = value->IsTheHole(); | 2249 bool is_const = value->IsTheHole(); |
2250 bool is_function = value->IsSharedFunctionInfo(); | 2250 bool is_function = value->IsSharedFunctionInfo(); |
2251 ASSERT(is_var + is_const + is_function == 1); | 2251 ASSERT(is_var + is_const + is_function == 1); |
2252 | 2252 |
2253 if (is_var || is_const) { | 2253 if (is_var || is_const) { |
2254 // Lookup the property in the global object, and don't set the | 2254 // Lookup the property in the global object, and don't set the |
2255 // value of the variable if the property is already there. | 2255 // value of the variable if the property is already there. |
2256 // Do the lookup locally only, see ES5 erratum. | 2256 // Do the lookup locally only, see ES5 erratum. |
2257 LookupResult lookup(isolate); | 2257 LookupResult lookup(isolate); |
2258 global->LocalLookup(*name, &lookup, true); | 2258 global->LocalLookup(name, &lookup, true); |
2259 if (lookup.IsFound()) { | 2259 if (lookup.IsFound()) { |
2260 // We found an existing property. Unless it was an interceptor | 2260 // We found an existing property. Unless it was an interceptor |
2261 // that claims the property is absent, skip this declaration. | 2261 // that claims the property is absent, skip this declaration. |
2262 if (!lookup.IsInterceptor()) continue; | 2262 if (!lookup.IsInterceptor()) continue; |
2263 if (JSReceiver::GetPropertyAttribute(global, name) != ABSENT) continue; | 2263 if (JSReceiver::GetPropertyAttribute(global, name) != ABSENT) continue; |
2264 // Fall-through and introduce the absent property by using | 2264 // Fall-through and introduce the absent property by using |
2265 // SetProperty. | 2265 // SetProperty. |
2266 } | 2266 } |
2267 } else if (is_function) { | 2267 } else if (is_function) { |
2268 // Copy the function and update its context. Use it as value. | 2268 // Copy the function and update its context. Use it as value. |
2269 Handle<SharedFunctionInfo> shared = | 2269 Handle<SharedFunctionInfo> shared = |
2270 Handle<SharedFunctionInfo>::cast(value); | 2270 Handle<SharedFunctionInfo>::cast(value); |
2271 Handle<JSFunction> function = | 2271 Handle<JSFunction> function = |
2272 isolate->factory()->NewFunctionFromSharedFunctionInfo( | 2272 isolate->factory()->NewFunctionFromSharedFunctionInfo( |
2273 shared, context, TENURED); | 2273 shared, context, TENURED); |
2274 value = function; | 2274 value = function; |
2275 } | 2275 } |
2276 | 2276 |
2277 LookupResult lookup(isolate); | 2277 LookupResult lookup(isolate); |
2278 global->LocalLookup(*name, &lookup, true); | 2278 global->LocalLookup(name, &lookup, true); |
2279 | 2279 |
2280 // Compute the property attributes. According to ECMA-262, | 2280 // Compute the property attributes. According to ECMA-262, |
2281 // the property must be non-configurable except in eval. | 2281 // the property must be non-configurable except in eval. |
2282 int attr = NONE; | 2282 int attr = NONE; |
2283 bool is_eval = DeclareGlobalsEvalFlag::decode(flags); | 2283 bool is_eval = DeclareGlobalsEvalFlag::decode(flags); |
2284 if (!is_eval) { | 2284 if (!is_eval) { |
2285 attr |= DONT_DELETE; | 2285 attr |= DONT_DELETE; |
2286 } | 2286 } |
2287 bool is_native = DeclareGlobalsNativeFlag::decode(flags); | 2287 bool is_native = DeclareGlobalsNativeFlag::decode(flags); |
2288 if (is_const || (is_native && is_function)) { | 2288 if (is_const || (is_native && is_function)) { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2395 if (*initial_value != NULL) value = initial_value; | 2395 if (*initial_value != NULL) value = initial_value; |
2396 // Declaring a const context slot is a conflicting declaration if | 2396 // Declaring a const context slot is a conflicting declaration if |
2397 // there is a callback with that name in a prototype. It is | 2397 // there is a callback with that name in a prototype. It is |
2398 // allowed to introduce const variables in | 2398 // allowed to introduce const variables in |
2399 // JSContextExtensionObjects. They are treated specially in | 2399 // JSContextExtensionObjects. They are treated specially in |
2400 // SetProperty and no setters are invoked for those since they are | 2400 // SetProperty and no setters are invoked for those since they are |
2401 // not real JSObjects. | 2401 // not real JSObjects. |
2402 if (initial_value->IsTheHole() && | 2402 if (initial_value->IsTheHole() && |
2403 !object->IsJSContextExtensionObject()) { | 2403 !object->IsJSContextExtensionObject()) { |
2404 LookupResult lookup(isolate); | 2404 LookupResult lookup(isolate); |
2405 object->Lookup(*name, &lookup); | 2405 object->Lookup(name, &lookup); |
2406 if (lookup.IsPropertyCallbacks()) { | 2406 if (lookup.IsPropertyCallbacks()) { |
2407 return ThrowRedeclarationError(isolate, name); | 2407 return ThrowRedeclarationError(isolate, name); |
2408 } | 2408 } |
2409 } | 2409 } |
2410 if (object->IsJSGlobalObject()) { | 2410 if (object->IsJSGlobalObject()) { |
2411 // Define own property on the global object. | 2411 // Define own property on the global object. |
2412 RETURN_FAILURE_ON_EXCEPTION(isolate, | 2412 RETURN_FAILURE_ON_EXCEPTION(isolate, |
2413 JSObject::SetLocalPropertyIgnoreAttributes(object, name, value, mode)); | 2413 JSObject::SetLocalPropertyIgnoreAttributes(object, name, value, mode)); |
2414 } else { | 2414 } else { |
2415 RETURN_FAILURE_ON_EXCEPTION(isolate, | 2415 RETURN_FAILURE_ON_EXCEPTION(isolate, |
(...skipping 24 matching lines...) Expand all Loading... |
2440 PropertyAttributes attributes = DONT_DELETE; | 2440 PropertyAttributes attributes = DONT_DELETE; |
2441 | 2441 |
2442 // Lookup the property locally in the global object. If it isn't | 2442 // Lookup the property locally in the global object. If it isn't |
2443 // there, there is a property with this name in the prototype chain. | 2443 // there, there is a property with this name in the prototype chain. |
2444 // We follow Safari and Firefox behavior and only set the property | 2444 // We follow Safari and Firefox behavior and only set the property |
2445 // locally if there is an explicit initialization value that we have | 2445 // locally if there is an explicit initialization value that we have |
2446 // to assign to the property. | 2446 // to assign to the property. |
2447 // Note that objects can have hidden prototypes, so we need to traverse | 2447 // Note that objects can have hidden prototypes, so we need to traverse |
2448 // the whole chain of hidden prototypes to do a 'local' lookup. | 2448 // the whole chain of hidden prototypes to do a 'local' lookup. |
2449 LookupResult lookup(isolate); | 2449 LookupResult lookup(isolate); |
2450 isolate->context()->global_object()->LocalLookup(*name, &lookup, true); | 2450 isolate->context()->global_object()->LocalLookup(name, &lookup, true); |
2451 if (lookup.IsInterceptor()) { | 2451 if (lookup.IsInterceptor()) { |
2452 Handle<JSObject> holder(lookup.holder()); | 2452 Handle<JSObject> holder(lookup.holder()); |
2453 PropertyAttributes intercepted = | 2453 PropertyAttributes intercepted = |
2454 JSReceiver::GetPropertyAttribute(holder, name); | 2454 JSReceiver::GetPropertyAttribute(holder, name); |
2455 if (intercepted != ABSENT && (intercepted & READ_ONLY) == 0) { | 2455 if (intercepted != ABSENT && (intercepted & READ_ONLY) == 0) { |
2456 // Found an interceptor that's not read only. | 2456 // Found an interceptor that's not read only. |
2457 if (assign) { | 2457 if (assign) { |
2458 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); | 2458 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); |
2459 Handle<Object> result; | 2459 Handle<Object> result; |
2460 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 2460 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2497 // not be deletable. Since it's a const, it must be READ_ONLY too. | 2497 // not be deletable. Since it's a const, it must be READ_ONLY too. |
2498 PropertyAttributes attributes = | 2498 PropertyAttributes attributes = |
2499 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); | 2499 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); |
2500 | 2500 |
2501 // Lookup the property locally in the global object. If it isn't | 2501 // Lookup the property locally in the global object. If it isn't |
2502 // there, we add the property and take special precautions to always | 2502 // there, we add the property and take special precautions to always |
2503 // add it as a local property even in case of callbacks in the | 2503 // add it as a local property even in case of callbacks in the |
2504 // prototype chain (this rules out using SetProperty). | 2504 // prototype chain (this rules out using SetProperty). |
2505 // We use SetLocalPropertyIgnoreAttributes instead | 2505 // We use SetLocalPropertyIgnoreAttributes instead |
2506 LookupResult lookup(isolate); | 2506 LookupResult lookup(isolate); |
2507 global->LocalLookup(*name, &lookup); | 2507 global->LocalLookup(name, &lookup); |
2508 if (!lookup.IsFound()) { | 2508 if (!lookup.IsFound()) { |
2509 HandleScope handle_scope(isolate); | 2509 HandleScope handle_scope(isolate); |
2510 Handle<GlobalObject> global(isolate->context()->global_object()); | 2510 Handle<GlobalObject> global(isolate->context()->global_object()); |
2511 RETURN_FAILURE_ON_EXCEPTION( | 2511 RETURN_FAILURE_ON_EXCEPTION( |
2512 isolate, | 2512 isolate, |
2513 JSObject::SetLocalPropertyIgnoreAttributes(global, name, value, | 2513 JSObject::SetLocalPropertyIgnoreAttributes(global, name, value, |
2514 attributes)); | 2514 attributes)); |
2515 return *value; | 2515 return *value; |
2516 } | 2516 } |
2517 | 2517 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2613 // function f() { eval("delete x; const x;"); } | 2613 // function f() { eval("delete x; const x;"); } |
2614 // | 2614 // |
2615 // In that case, the initialization behaves like a normal assignment. | 2615 // In that case, the initialization behaves like a normal assignment. |
2616 Handle<JSObject> object = Handle<JSObject>::cast(holder); | 2616 Handle<JSObject> object = Handle<JSObject>::cast(holder); |
2617 | 2617 |
2618 if (*object == context->extension()) { | 2618 if (*object == context->extension()) { |
2619 // This is the property that was introduced by the const declaration. | 2619 // This is the property that was introduced by the const declaration. |
2620 // Set it if it hasn't been set before. NOTE: We cannot use | 2620 // Set it if it hasn't been set before. NOTE: We cannot use |
2621 // GetProperty() to get the current value as it 'unholes' the value. | 2621 // GetProperty() to get the current value as it 'unholes' the value. |
2622 LookupResult lookup(isolate); | 2622 LookupResult lookup(isolate); |
2623 object->LocalLookupRealNamedProperty(*name, &lookup); | 2623 object->LocalLookupRealNamedProperty(name, &lookup); |
2624 ASSERT(lookup.IsFound()); // the property was declared | 2624 ASSERT(lookup.IsFound()); // the property was declared |
2625 ASSERT(lookup.IsReadOnly()); // and it was declared as read-only | 2625 ASSERT(lookup.IsReadOnly()); // and it was declared as read-only |
2626 | 2626 |
2627 if (lookup.IsField()) { | 2627 if (lookup.IsField()) { |
2628 FixedArray* properties = object->properties(); | 2628 FixedArray* properties = object->properties(); |
2629 int index = lookup.GetFieldIndex().field_index(); | 2629 int index = lookup.GetFieldIndex().field_index(); |
2630 if (properties->get(index)->IsTheHole()) { | 2630 if (properties->get(index)->IsTheHole()) { |
2631 properties->set(index, *value); | 2631 properties->set(index, *value); |
2632 } | 2632 } |
2633 } else if (lookup.IsNormal()) { | 2633 } else if (lookup.IsNormal()) { |
(...skipping 2453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5087 if (offset != -1) { | 5087 if (offset != -1) { |
5088 // Doubles are not cached, so raw read the value. | 5088 // Doubles are not cached, so raw read the value. |
5089 Object* value = receiver->RawFastPropertyAt(offset); | 5089 Object* value = receiver->RawFastPropertyAt(offset); |
5090 return value->IsTheHole() | 5090 return value->IsTheHole() |
5091 ? isolate->heap()->undefined_value() | 5091 ? isolate->heap()->undefined_value() |
5092 : value; | 5092 : value; |
5093 } | 5093 } |
5094 // Lookup cache miss. Perform lookup and update the cache if | 5094 // Lookup cache miss. Perform lookup and update the cache if |
5095 // appropriate. | 5095 // appropriate. |
5096 LookupResult result(isolate); | 5096 LookupResult result(isolate); |
5097 receiver->LocalLookup(*key, &result); | 5097 receiver->LocalLookup(key, &result); |
5098 if (result.IsField()) { | 5098 if (result.IsField()) { |
5099 int offset = result.GetFieldIndex().field_index(); | 5099 int offset = result.GetFieldIndex().field_index(); |
5100 // Do not track double fields in the keyed lookup cache. Reading | 5100 // Do not track double fields in the keyed lookup cache. Reading |
5101 // double values requires boxing. | 5101 // double values requires boxing. |
5102 if (!result.representation().IsDouble()) { | 5102 if (!result.representation().IsDouble()) { |
5103 keyed_lookup_cache->Update(receiver_map, *key, offset); | 5103 keyed_lookup_cache->Update(receiver_map, *key, offset); |
5104 } | 5104 } |
5105 AllowHeapAllocation allow_allocation; | 5105 AllowHeapAllocation allow_allocation; |
5106 return *JSObject::FastPropertyAt( | 5106 return *JSObject::FastPropertyAt( |
5107 receiver, result.representation(), offset); | 5107 receiver, result.representation(), offset); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5212 RUNTIME_ASSERT((unchecked & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0); | 5212 RUNTIME_ASSERT((unchecked & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0); |
5213 PropertyAttributes attr = static_cast<PropertyAttributes>(unchecked); | 5213 PropertyAttributes attr = static_cast<PropertyAttributes>(unchecked); |
5214 | 5214 |
5215 // Check access rights if needed. | 5215 // Check access rights if needed. |
5216 if (js_object->IsAccessCheckNeeded() && | 5216 if (js_object->IsAccessCheckNeeded() && |
5217 !isolate->MayNamedAccess(js_object, name, v8::ACCESS_SET)) { | 5217 !isolate->MayNamedAccess(js_object, name, v8::ACCESS_SET)) { |
5218 return isolate->heap()->undefined_value(); | 5218 return isolate->heap()->undefined_value(); |
5219 } | 5219 } |
5220 | 5220 |
5221 LookupResult lookup(isolate); | 5221 LookupResult lookup(isolate); |
5222 js_object->LocalLookupRealNamedProperty(*name, &lookup); | 5222 js_object->LocalLookupRealNamedProperty(name, &lookup); |
5223 | 5223 |
5224 // Special case for callback properties. | 5224 // Special case for callback properties. |
5225 if (lookup.IsPropertyCallbacks()) { | 5225 if (lookup.IsPropertyCallbacks()) { |
5226 Handle<Object> callback(lookup.GetCallbackObject(), isolate); | 5226 Handle<Object> callback(lookup.GetCallbackObject(), isolate); |
5227 // Avoid redefining callback as data property, just use the stored | 5227 // Avoid redefining callback as data property, just use the stored |
5228 // setter to update the value instead. | 5228 // setter to update the value instead. |
5229 // TODO(mstarzinger): So far this only works if property attributes don't | 5229 // TODO(mstarzinger): So far this only works if property attributes don't |
5230 // change, this should be fixed once we cleanup the underlying code. | 5230 // change, this should be fixed once we cleanup the underlying code. |
5231 ASSERT(!callback->IsForeign()); | 5231 ASSERT(!callback->IsForeign()); |
5232 if (callback->IsAccessorInfo() && | 5232 if (callback->IsAccessorInfo() && |
(...skipping 5647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10880 return *isolate->factory()->NewJSArrayWithElements(details); | 10880 return *isolate->factory()->NewJSArrayWithElements(details); |
10881 } | 10881 } |
10882 | 10882 |
10883 // Find the number of objects making up this. | 10883 // Find the number of objects making up this. |
10884 int length = LocalPrototypeChainLength(*obj); | 10884 int length = LocalPrototypeChainLength(*obj); |
10885 | 10885 |
10886 // Try local lookup on each of the objects. | 10886 // Try local lookup on each of the objects. |
10887 Handle<JSObject> jsproto = obj; | 10887 Handle<JSObject> jsproto = obj; |
10888 for (int i = 0; i < length; i++) { | 10888 for (int i = 0; i < length; i++) { |
10889 LookupResult result(isolate); | 10889 LookupResult result(isolate); |
10890 jsproto->LocalLookup(*name, &result); | 10890 jsproto->LocalLookup(name, &result); |
10891 if (result.IsFound()) { | 10891 if (result.IsFound()) { |
10892 // LookupResult is not GC safe as it holds raw object pointers. | 10892 // LookupResult is not GC safe as it holds raw object pointers. |
10893 // GC can happen later in this code so put the required fields into | 10893 // GC can happen later in this code so put the required fields into |
10894 // local variables using handles when required for later use. | 10894 // local variables using handles when required for later use. |
10895 Handle<Object> result_callback_obj; | 10895 Handle<Object> result_callback_obj; |
10896 if (result.IsPropertyCallbacks()) { | 10896 if (result.IsPropertyCallbacks()) { |
10897 result_callback_obj = Handle<Object>(result.GetCallbackObject(), | 10897 result_callback_obj = Handle<Object>(result.GetCallbackObject(), |
10898 isolate); | 10898 isolate); |
10899 } | 10899 } |
10900 | 10900 |
(...skipping 30 matching lines...) Expand all Loading... |
10931 | 10931 |
10932 RUNTIME_FUNCTION(Runtime_DebugGetProperty) { | 10932 RUNTIME_FUNCTION(Runtime_DebugGetProperty) { |
10933 HandleScope scope(isolate); | 10933 HandleScope scope(isolate); |
10934 | 10934 |
10935 ASSERT(args.length() == 2); | 10935 ASSERT(args.length() == 2); |
10936 | 10936 |
10937 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); | 10937 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); |
10938 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1); | 10938 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1); |
10939 | 10939 |
10940 LookupResult result(isolate); | 10940 LookupResult result(isolate); |
10941 obj->Lookup(*name, &result); | 10941 obj->Lookup(name, &result); |
10942 return *DebugLookupResultValue(isolate, obj, name, &result); | 10942 return *DebugLookupResultValue(isolate, obj, name, &result); |
10943 } | 10943 } |
10944 | 10944 |
10945 | 10945 |
10946 // Return the property type calculated from the property details. | 10946 // Return the property type calculated from the property details. |
10947 // args[0]: smi with property details. | 10947 // args[0]: smi with property details. |
10948 RUNTIME_FUNCTION(Runtime_DebugPropertyTypeFromDetails) { | 10948 RUNTIME_FUNCTION(Runtime_DebugPropertyTypeFromDetails) { |
10949 SealHandleScope shs(isolate); | 10949 SealHandleScope shs(isolate); |
10950 ASSERT(args.length() == 1); | 10950 ASSERT(args.length() == 1); |
10951 CONVERT_PROPERTY_DETAILS_CHECKED(details, 0); | 10951 CONVERT_PROPERTY_DETAILS_CHECKED(details, 0); |
(...skipping 4185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15137 } | 15137 } |
15138 return NULL; | 15138 return NULL; |
15139 } | 15139 } |
15140 | 15140 |
15141 | 15141 |
15142 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15142 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15143 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15143 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15144 } | 15144 } |
15145 | 15145 |
15146 } } // namespace v8::internal | 15146 } } // namespace v8::internal |
OLD | NEW |