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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 10584030: Back port r11886: Fix GC bug with missing handle. Bug=133618 (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.11/
Patch Set: Created 8 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 | « src/version.cc ('k') | 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 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 // Non-negative property indices are in the properties array. 2211 // Non-negative property indices are in the properties array.
2212 __ movq(result, FieldOperand(object, JSObject::kPropertiesOffset)); 2212 __ movq(result, FieldOperand(object, JSObject::kPropertiesOffset));
2213 __ movq(result, FieldOperand(result, offset + FixedArray::kHeaderSize)); 2213 __ movq(result, FieldOperand(result, offset + FixedArray::kHeaderSize));
2214 } 2214 }
2215 } else if (lookup.IsFound() && lookup.type() == CONSTANT_FUNCTION) { 2215 } else if (lookup.IsFound() && lookup.type() == CONSTANT_FUNCTION) {
2216 Handle<JSFunction> function(lookup.GetConstantFunctionFromMap(*type)); 2216 Handle<JSFunction> function(lookup.GetConstantFunctionFromMap(*type));
2217 __ LoadHeapObject(result, function); 2217 __ LoadHeapObject(result, function);
2218 } else { 2218 } else {
2219 // Negative lookup. 2219 // Negative lookup.
2220 // Check prototypes. 2220 // Check prototypes.
2221 HeapObject* current = HeapObject::cast((*type)->prototype()); 2221 Handle<HeapObject> current(HeapObject::cast((*type)->prototype()));
2222 Heap* heap = type->GetHeap(); 2222 Heap* heap = type->GetHeap();
2223 while (current != heap->null_value()) { 2223 while (*current != heap->null_value()) {
2224 Handle<HeapObject> link(current); 2224 __ LoadHeapObject(result, current);
2225 __ LoadHeapObject(result, link);
2226 __ Cmp(FieldOperand(result, HeapObject::kMapOffset), 2225 __ Cmp(FieldOperand(result, HeapObject::kMapOffset),
2227 Handle<Map>(JSObject::cast(current)->map())); 2226 Handle<Map>(current->map()));
2228 DeoptimizeIf(not_equal, env); 2227 DeoptimizeIf(not_equal, env);
2229 current = HeapObject::cast(current->map()->prototype()); 2228 current =
2229 Handle<HeapObject>(HeapObject::cast(current->map()->prototype()));
2230 } 2230 }
2231 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); 2231 __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
2232 } 2232 }
2233 } 2233 }
2234 2234
2235 2235
2236 // Check for cases where EmitLoadFieldOrConstantFunction needs to walk the 2236 // Check for cases where EmitLoadFieldOrConstantFunction needs to walk the
2237 // prototype chain, which causes unbounded code generation. 2237 // prototype chain, which causes unbounded code generation.
2238 static bool CompactEmit( 2238 static bool CompactEmit(
2239 SmallMapList* list, Handle<String> name, int i, Isolate* isolate) { 2239 SmallMapList* list, Handle<String> name, int i, Isolate* isolate) {
(...skipping 2705 matching lines...) Expand 10 before | Expand all | Expand 10 after
4945 FixedArray::kHeaderSize - kPointerSize)); 4945 FixedArray::kHeaderSize - kPointerSize));
4946 __ bind(&done); 4946 __ bind(&done);
4947 } 4947 }
4948 4948
4949 4949
4950 #undef __ 4950 #undef __
4951 4951
4952 } } // namespace v8::internal 4952 } } // namespace v8::internal
4953 4953
4954 #endif // V8_TARGET_ARCH_X64 4954 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698