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

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

Issue 118553003: Upgrade Symbol implementation to match current ES6 behavior. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: Fix fundamental issues surrounding Symbol values vs (wrapper) objects Created 6 years, 11 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
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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 check = BOOLEAN_CHECK; 274 check = BOOLEAN_CHECK;
275 } 275 }
276 276
277 if (check != RECEIVER_MAP_CHECK && 277 if (check != RECEIVER_MAP_CHECK &&
278 !function->IsBuiltin() && 278 !function->IsBuiltin() &&
279 function->shared()->is_classic_mode()) { 279 function->shared()->is_classic_mode()) {
280 // Calling non-strict non-builtins with a value as the receiver 280 // Calling non-strict non-builtins with a value as the receiver
281 // requires boxing. 281 // requires boxing.
282 return Handle<Code>::null(); 282 return Handle<Code>::null();
283 } 283 }
284 if (check == SYMBOL_CHECK) {
285 // Boxing always required for Symbol value receivers,
286 // as even Symbol builtins expect them to be boxed.
287 return Handle<Code>::null();
288 }
284 289
285 Code::Flags flags = Code::ComputeMonomorphicFlags( 290 Code::Flags flags = Code::ComputeMonomorphicFlags(
286 kind, extra_state, cache_holder, Code::FAST, argc); 291 kind, extra_state, cache_holder, Code::FAST, argc);
287 Handle<Object> probe(stub_holder->map()->FindInCodeCache(*name, flags), 292 Handle<Object> probe(stub_holder->map()->FindInCodeCache(*name, flags),
288 isolate_); 293 isolate_);
289 if (probe->IsCode()) return Handle<Code>::cast(probe); 294 if (probe->IsCode()) return Handle<Code>::cast(probe);
290 295
291 CallStubCompiler compiler(isolate_, argc, kind, extra_state, cache_holder); 296 CallStubCompiler compiler(isolate_, argc, kind, extra_state, cache_holder);
292 Handle<Code> code = 297 Handle<Code> code =
293 compiler.CompileCallConstant(object, holder, name, check, function); 298 compiler.CompileCallConstant(object, holder, name, check, function);
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 Handle<FunctionTemplateInfo>( 1906 Handle<FunctionTemplateInfo>(
1902 FunctionTemplateInfo::cast(signature->receiver())); 1907 FunctionTemplateInfo::cast(signature->receiver()));
1903 } 1908 }
1904 } 1909 }
1905 1910
1906 is_simple_api_call_ = true; 1911 is_simple_api_call_ = true;
1907 } 1912 }
1908 1913
1909 1914
1910 } } // namespace v8::internal 1915 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698