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

Side by Side Diff: src/api-natives.cc

Issue 2043183003: Replace all remaining Oddball checks with new function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: keep em coming Created 4 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
« no previous file with comments | « src/api.cc ('k') | src/ast/ast.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 "src/api-natives.h" 5 #include "src/api-natives.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/isolate-inl.h" 8 #include "src/isolate-inl.h"
9 #include "src/lookup.h" 9 #include "src/lookup.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 isolate->native_context()->set_template_instantiations_cache(*new_cache); 280 isolate->native_context()->set_template_instantiations_cache(*new_cache);
281 } 281 }
282 282
283 void UncacheTemplateInstantiation(Isolate* isolate, uint32_t serial_number) { 283 void UncacheTemplateInstantiation(Isolate* isolate, uint32_t serial_number) {
284 auto cache = isolate->template_instantiations_cache(); 284 auto cache = isolate->template_instantiations_cache();
285 int entry = cache->FindEntry(serial_number); 285 int entry = cache->FindEntry(serial_number);
286 DCHECK(entry != UnseededNumberDictionary::kNotFound); 286 DCHECK(entry != UnseededNumberDictionary::kNotFound);
287 Handle<Object> result = 287 Handle<Object> result =
288 UnseededNumberDictionary::DeleteProperty(cache, entry); 288 UnseededNumberDictionary::DeleteProperty(cache, entry);
289 USE(result); 289 USE(result);
290 DCHECK(result->IsTrue()); 290 DCHECK(result->IsTrue(isolate));
291 auto new_cache = UnseededNumberDictionary::Shrink(cache, entry); 291 auto new_cache = UnseededNumberDictionary::Shrink(cache, entry);
292 isolate->native_context()->set_template_instantiations_cache(*new_cache); 292 isolate->native_context()->set_template_instantiations_cache(*new_cache);
293 } 293 }
294 294
295 MaybeHandle<JSObject> InstantiateObject(Isolate* isolate, 295 MaybeHandle<JSObject> InstantiateObject(Isolate* isolate,
296 Handle<ObjectTemplateInfo> info, 296 Handle<ObjectTemplateInfo> info,
297 Handle<JSReceiver> new_target, 297 Handle<JSReceiver> new_target,
298 bool is_hidden_prototype) { 298 bool is_hidden_prototype) {
299 Handle<JSFunction> constructor; 299 Handle<JSFunction> constructor;
300 uint32_t serial_number = 300 uint32_t serial_number =
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 map->set_is_callable(); 650 map->set_is_callable();
651 map->set_is_constructor(true); 651 map->set_is_constructor(true);
652 } 652 }
653 653
654 DCHECK(result->shared()->IsApiFunction()); 654 DCHECK(result->shared()->IsApiFunction());
655 return result; 655 return result;
656 } 656 }
657 657
658 } // namespace internal 658 } // namespace internal
659 } // namespace v8 659 } // namespace v8
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/ast/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698