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

Side by Side Diff: src/deoptimizer.h

Issue 11028027: Revert trunk to bleeding_edge at r12484 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 2 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/debug.cc ('k') | src/deoptimizer.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 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 Address slot_address() const { return slot_address_; } 51 Address slot_address() const { return slot_address_; }
52 double value() const { return val_; } 52 double value() const { return val_; }
53 53
54 private: 54 private:
55 Address slot_address_; 55 Address slot_address_;
56 double val_; 56 double val_;
57 }; 57 };
58 58
59 59
60 class ArgumentsObjectMaterializationDescriptor BASE_EMBEDDED {
61 public:
62 ArgumentsObjectMaterializationDescriptor(Address slot_address, int argc)
63 : slot_address_(slot_address), arguments_length_(argc) { }
64
65 Address slot_address() const { return slot_address_; }
66 int arguments_length() const { return arguments_length_; }
67
68 private:
69 Address slot_address_;
70 int arguments_length_;
71 };
72
73
74 class OptimizedFunctionVisitor BASE_EMBEDDED { 60 class OptimizedFunctionVisitor BASE_EMBEDDED {
75 public: 61 public:
76 virtual ~OptimizedFunctionVisitor() {} 62 virtual ~OptimizedFunctionVisitor() {}
77 63
78 // Function which is called before iteration of any optimized functions 64 // Function which is called before iteration of any optimized functions
79 // from given native context. 65 // from given native context.
80 virtual void EnterContext(Context* context) = 0; 66 virtual void EnterContext(Context* context) = 0;
81 67
82 virtual void VisitFunction(JSFunction* function) = 0; 68 virtual void VisitFunction(JSFunction* function) = 0;
83 69
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 189
204 // Change all patched stack guard checks in the unoptimized code 190 // Change all patched stack guard checks in the unoptimized code
205 // back to a normal stack guard check. 191 // back to a normal stack guard check.
206 static void RevertStackCheckCodeAt(Code* unoptimized_code, 192 static void RevertStackCheckCodeAt(Code* unoptimized_code,
207 Address pc_after, 193 Address pc_after,
208 Code* check_code, 194 Code* check_code,
209 Code* replacement_code); 195 Code* replacement_code);
210 196
211 ~Deoptimizer(); 197 ~Deoptimizer();
212 198
213 void MaterializeHeapObjects(JavaScriptFrameIterator* it); 199 void MaterializeHeapNumbers();
214 #ifdef ENABLE_DEBUGGER_SUPPORT 200 #ifdef ENABLE_DEBUGGER_SUPPORT
215 void MaterializeHeapNumbersForDebuggerInspectableFrame( 201 void MaterializeHeapNumbersForDebuggerInspectableFrame(
216 Address parameters_top, 202 Address parameters_top,
217 uint32_t parameters_size, 203 uint32_t parameters_size,
218 Address expressions_top, 204 Address expressions_top,
219 uint32_t expressions_size, 205 uint32_t expressions_size,
220 DeoptimizedFrameInfo* info); 206 DeoptimizedFrameInfo* info);
221 #endif 207 #endif
222 208
223 static void ComputeOutputFrames(Deoptimizer* deoptimizer); 209 static void ComputeOutputFrames(Deoptimizer* deoptimizer);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 int* input_offset); 298 int* input_offset);
313 299
314 unsigned ComputeInputFrameSize() const; 300 unsigned ComputeInputFrameSize() const;
315 unsigned ComputeFixedSize(JSFunction* function) const; 301 unsigned ComputeFixedSize(JSFunction* function) const;
316 302
317 unsigned ComputeIncomingArgumentSize(JSFunction* function) const; 303 unsigned ComputeIncomingArgumentSize(JSFunction* function) const;
318 unsigned ComputeOutgoingArgumentSize() const; 304 unsigned ComputeOutgoingArgumentSize() const;
319 305
320 Object* ComputeLiteral(int index) const; 306 Object* ComputeLiteral(int index) const;
321 307
322 void AddArgumentsObject(intptr_t slot_address, int argc);
323 void AddArgumentsObjectValue(intptr_t value);
324 void AddDoubleValue(intptr_t slot_address, double value); 308 void AddDoubleValue(intptr_t slot_address, double value);
325 309
326 static MemoryChunk* CreateCode(BailoutType type); 310 static MemoryChunk* CreateCode(BailoutType type);
327 static void GenerateDeoptimizationEntries( 311 static void GenerateDeoptimizationEntries(
328 MacroAssembler* masm, int count, BailoutType type); 312 MacroAssembler* masm, int count, BailoutType type);
329 313
330 // Weak handle callback for deoptimizing code objects. 314 // Weak handle callback for deoptimizing code objects.
331 static void HandleWeakDeoptimizedCode( 315 static void HandleWeakDeoptimizedCode(
332 v8::Persistent<v8::Value> obj, void* data); 316 v8::Persistent<v8::Value> obj, void* data);
333 static Code* FindDeoptimizingCodeFromAddress(Address addr); 317 static Code* FindDeoptimizingCodeFromAddress(Address addr);
(...skipping 15 matching lines...) Expand all
349 333
350 // Input frame description. 334 // Input frame description.
351 FrameDescription* input_; 335 FrameDescription* input_;
352 // Number of output frames. 336 // Number of output frames.
353 int output_count_; 337 int output_count_;
354 // Number of output js frames. 338 // Number of output js frames.
355 int jsframe_count_; 339 int jsframe_count_;
356 // Array of output frame descriptions. 340 // Array of output frame descriptions.
357 FrameDescription** output_; 341 FrameDescription** output_;
358 342
359 List<Object*> deferred_arguments_objects_values_;
360 List<ArgumentsObjectMaterializationDescriptor> deferred_arguments_objects_;
361 List<HeapNumberMaterializationDescriptor> deferred_heap_numbers_; 343 List<HeapNumberMaterializationDescriptor> deferred_heap_numbers_;
362 344
363 static const int table_entry_size_; 345 static const int table_entry_size_;
364 346
365 friend class FrameDescription; 347 friend class FrameDescription;
366 friend class DeoptimizingCodeListNode; 348 friend class DeoptimizingCodeListNode;
367 friend class DeoptimizedFrameInfo; 349 friend class DeoptimizedFrameInfo;
368 }; 350 };
369 351
370 352
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 void BeginSetterStubFrame(int literal_id); 601 void BeginSetterStubFrame(int literal_id);
620 void StoreRegister(Register reg); 602 void StoreRegister(Register reg);
621 void StoreInt32Register(Register reg); 603 void StoreInt32Register(Register reg);
622 void StoreUint32Register(Register reg); 604 void StoreUint32Register(Register reg);
623 void StoreDoubleRegister(DoubleRegister reg); 605 void StoreDoubleRegister(DoubleRegister reg);
624 void StoreStackSlot(int index); 606 void StoreStackSlot(int index);
625 void StoreInt32StackSlot(int index); 607 void StoreInt32StackSlot(int index);
626 void StoreUint32StackSlot(int index); 608 void StoreUint32StackSlot(int index);
627 void StoreDoubleStackSlot(int index); 609 void StoreDoubleStackSlot(int index);
628 void StoreLiteral(int literal_id); 610 void StoreLiteral(int literal_id);
629 void StoreArgumentsObject(int args_index, int args_length); 611 void StoreArgumentsObject();
630 void MarkDuplicate(); 612 void MarkDuplicate();
631 613
632 Zone* zone() const { return zone_; } 614 Zone* zone() const { return zone_; }
633 615
634 static int NumberOfOperandsFor(Opcode opcode); 616 static int NumberOfOperandsFor(Opcode opcode);
635 617
636 #if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER) 618 #if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER)
637 static const char* StringFor(Opcode opcode); 619 static const char* StringFor(Opcode opcode);
638 #endif 620 #endif
639 621
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 Object** expression_stack_; 811 Object** expression_stack_;
830 int source_position_; 812 int source_position_;
831 813
832 friend class Deoptimizer; 814 friend class Deoptimizer;
833 }; 815 };
834 #endif 816 #endif
835 817
836 } } // namespace v8::internal 818 } } // namespace v8::internal
837 819
838 #endif // V8_DEOPTIMIZER_H_ 820 #endif // V8_DEOPTIMIZER_H_
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698