Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: src/stub-cache.cc

Issue 16136012: adjust assertions for addition of default value (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 * Returns |Heap::no_interceptor_result_sentinel()| if interceptor doesn't 1131 * Returns |Heap::no_interceptor_result_sentinel()| if interceptor doesn't
1132 * provide any value for the given name. 1132 * provide any value for the given name.
1133 */ 1133 */
1134 RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorOnly) { 1134 RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorOnly) {
1135 typedef PropertyCallbackArguments PCA; 1135 typedef PropertyCallbackArguments PCA;
1136 static const int kArgsOffset = kAccessorInfoOffsetInInterceptorArgs; 1136 static const int kArgsOffset = kAccessorInfoOffsetInInterceptorArgs;
1137 Handle<Name> name_handle = args.at<Name>(0); 1137 Handle<Name> name_handle = args.at<Name>(0);
1138 Handle<InterceptorInfo> interceptor_info = args.at<InterceptorInfo>(1); 1138 Handle<InterceptorInfo> interceptor_info = args.at<InterceptorInfo>(1);
1139 ASSERT(kArgsOffset == 2); 1139 ASSERT(kArgsOffset == 2);
1140 // No ReturnValue in interceptors. 1140 // No ReturnValue in interceptors.
1141 ASSERT(args.length() == kArgsOffset + PCA::kArgsLength - 1); 1141 ASSERT_EQ(kArgsOffset + PCA::kArgsLength - 2, args.length());
1142 1142
1143 // TODO(rossberg): Support symbols in the API. 1143 // TODO(rossberg): Support symbols in the API.
1144 if (name_handle->IsSymbol()) 1144 if (name_handle->IsSymbol())
1145 return isolate->heap()->no_interceptor_result_sentinel(); 1145 return isolate->heap()->no_interceptor_result_sentinel();
1146 Handle<String> name = Handle<String>::cast(name_handle); 1146 Handle<String> name = Handle<String>::cast(name_handle);
1147 1147
1148 Address getter_address = v8::ToCData<Address>(interceptor_info->getter()); 1148 Address getter_address = v8::ToCData<Address>(interceptor_info->getter());
1149 v8::NamedPropertyGetter getter = 1149 v8::NamedPropertyGetter getter =
1150 FUNCTION_CAST<v8::NamedPropertyGetter>(getter_address); 1150 FUNCTION_CAST<v8::NamedPropertyGetter>(getter_address);
1151 ASSERT(getter != NULL); 1151 ASSERT(getter != NULL);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 1198
1199 1199
1200 static MaybeObject* LoadWithInterceptor(Arguments* args, 1200 static MaybeObject* LoadWithInterceptor(Arguments* args,
1201 PropertyAttributes* attrs) { 1201 PropertyAttributes* attrs) {
1202 typedef PropertyCallbackArguments PCA; 1202 typedef PropertyCallbackArguments PCA;
1203 static const int kArgsOffset = kAccessorInfoOffsetInInterceptorArgs; 1203 static const int kArgsOffset = kAccessorInfoOffsetInInterceptorArgs;
1204 Handle<Name> name_handle = args->at<Name>(0); 1204 Handle<Name> name_handle = args->at<Name>(0);
1205 Handle<InterceptorInfo> interceptor_info = args->at<InterceptorInfo>(1); 1205 Handle<InterceptorInfo> interceptor_info = args->at<InterceptorInfo>(1);
1206 ASSERT(kArgsOffset == 2); 1206 ASSERT(kArgsOffset == 2);
1207 // No ReturnValue in interceptors. 1207 // No ReturnValue in interceptors.
1208 ASSERT(args->length() == kArgsOffset + PCA::kArgsLength - 1); 1208 ASSERT_EQ(kArgsOffset + PCA::kArgsLength - 2, args->length());
1209 Handle<JSObject> receiver_handle = 1209 Handle<JSObject> receiver_handle =
1210 args->at<JSObject>(kArgsOffset - PCA::kThisIndex); 1210 args->at<JSObject>(kArgsOffset - PCA::kThisIndex);
1211 Handle<JSObject> holder_handle = 1211 Handle<JSObject> holder_handle =
1212 args->at<JSObject>(kArgsOffset - PCA::kHolderIndex); 1212 args->at<JSObject>(kArgsOffset - PCA::kHolderIndex);
1213 1213
1214 Isolate* isolate = receiver_handle->GetIsolate(); 1214 Isolate* isolate = receiver_handle->GetIsolate();
1215 1215
1216 // TODO(rossberg): Support symbols in the API. 1216 // TODO(rossberg): Support symbols in the API.
1217 if (name_handle->IsSymbol()) 1217 if (name_handle->IsSymbol())
1218 return holder_handle->GetPropertyPostInterceptor( 1218 return holder_handle->GetPropertyPostInterceptor(
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
2095 Handle<FunctionTemplateInfo>( 2095 Handle<FunctionTemplateInfo>(
2096 FunctionTemplateInfo::cast(signature->receiver())); 2096 FunctionTemplateInfo::cast(signature->receiver()));
2097 } 2097 }
2098 } 2098 }
2099 2099
2100 is_simple_api_call_ = true; 2100 is_simple_api_call_ = true;
2101 } 2101 }
2102 2102
2103 2103
2104 } } // namespace v8::internal 2104 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698