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

Side by Side Diff: src/builtins.cc

Issue 149133004: A64: Synchronize with r17807. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | « src/ast.cc ('k') | src/checks.h » ('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 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 if (array_proto->elements() != heap->empty_fixed_array()) return false; 304 if (array_proto->elements() != heap->empty_fixed_array()) return false;
305 return array_proto->GetPrototype()->IsNull(); 305 return array_proto->GetPrototype()->IsNull();
306 } 306 }
307 307
308 308
309 MUST_USE_RESULT 309 MUST_USE_RESULT
310 static inline MaybeObject* EnsureJSArrayWithWritableFastElements( 310 static inline MaybeObject* EnsureJSArrayWithWritableFastElements(
311 Heap* heap, Object* receiver, Arguments* args, int first_added_arg) { 311 Heap* heap, Object* receiver, Arguments* args, int first_added_arg) {
312 if (!receiver->IsJSArray()) return NULL; 312 if (!receiver->IsJSArray()) return NULL;
313 JSArray* array = JSArray::cast(receiver); 313 JSArray* array = JSArray::cast(receiver);
314 if (array->map()->is_observed()) return NULL;
314 HeapObject* elms = array->elements(); 315 HeapObject* elms = array->elements();
315 Map* map = elms->map(); 316 Map* map = elms->map();
316 if (map == heap->fixed_array_map()) { 317 if (map == heap->fixed_array_map()) {
317 if (args == NULL || array->HasFastObjectElements()) return elms; 318 if (args == NULL || array->HasFastObjectElements()) return elms;
318 } else if (map == heap->fixed_cow_array_map()) { 319 } else if (map == heap->fixed_cow_array_map()) {
319 MaybeObject* maybe_writable_result = array->EnsureWritableFastElements(); 320 MaybeObject* maybe_writable_result = array->EnsureWritableFastElements();
320 if (args == NULL || array->HasFastObjectElements() || 321 if (args == NULL || array->HasFastObjectElements() ||
321 !maybe_writable_result->To(&elms)) { 322 !maybe_writable_result->To(&elms)) {
322 return maybe_writable_result; 323 return maybe_writable_result;
323 } 324 }
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 } 1825 }
1825 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 1826 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
1826 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 1827 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
1827 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 1828 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
1828 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 1829 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
1829 #undef DEFINE_BUILTIN_ACCESSOR_C 1830 #undef DEFINE_BUILTIN_ACCESSOR_C
1830 #undef DEFINE_BUILTIN_ACCESSOR_A 1831 #undef DEFINE_BUILTIN_ACCESSOR_A
1831 1832
1832 1833
1833 } } // namespace v8::internal 1834 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/checks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698