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

Side by Side Diff: src/deoptimizer.h

Issue 942513002: Put the type feedback vector in the unoptimized JavaScript frame. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: ia32 lithium fix. Created 5 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_DEOPTIMIZER_H_ 5 #ifndef V8_DEOPTIMIZER_H_
6 #define V8_DEOPTIMIZER_H_ 6 #define V8_DEOPTIMIZER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 // Translate value, store the result into the given frame slot. 402 // Translate value, store the result into the given frame slot.
403 void DoTranslateCommand(TranslationIterator* iterator, 403 void DoTranslateCommand(TranslationIterator* iterator,
404 int frame_index, 404 int frame_index,
405 unsigned output_offset); 405 unsigned output_offset);
406 406
407 // Translate object, do not store the result anywhere (but do update 407 // Translate object, do not store the result anywhere (but do update
408 // the deferred materialization array). 408 // the deferred materialization array).
409 void DoTranslateObjectAndSkip(TranslationIterator* iterator); 409 void DoTranslateObjectAndSkip(TranslationIterator* iterator);
410 410
411 unsigned ComputeInputFrameSize() const; 411 unsigned ComputeInputFrameSize() const;
412 unsigned ComputeFixedSize(JSFunction* function) const; 412
413 // Unoptimized javascript frames have an additional word for the type
414 // feedback vector.
415 unsigned ComputeFixedSize(JSFunction* function,
416 bool unoptimized_frame = false) const;
413 417
414 unsigned ComputeIncomingArgumentSize(JSFunction* function) const; 418 unsigned ComputeIncomingArgumentSize(JSFunction* function) const;
415 unsigned ComputeOutgoingArgumentSize() const; 419 unsigned ComputeOutgoingArgumentSize() const;
416 420
417 Object* ComputeLiteral(int index) const; 421 Object* ComputeLiteral(int index) const;
418 422
419 void AddObjectStart(intptr_t slot_address, int argc, bool is_arguments); 423 void AddObjectStart(intptr_t slot_address, int argc, bool is_arguments);
420 void AddObjectDuplication(intptr_t slot, int object_index); 424 void AddObjectDuplication(intptr_t slot, int object_index);
421 void AddObjectTaggedValue(intptr_t value); 425 void AddObjectTaggedValue(intptr_t value);
422 void AddObjectDoubleValue(double value); 426 void AddObjectDoubleValue(double value);
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 static SlotRef ComputeSlotForNextArgument( 948 static SlotRef ComputeSlotForNextArgument(
945 Translation::Opcode opcode, 949 Translation::Opcode opcode,
946 TranslationIterator* iterator, 950 TranslationIterator* iterator,
947 DeoptimizationInputData* data, 951 DeoptimizationInputData* data,
948 JavaScriptFrame* frame); 952 JavaScriptFrame* frame);
949 953
950 Handle<Object> GetPreviouslyMaterialized(Isolate* isolate, int length); 954 Handle<Object> GetPreviouslyMaterialized(Isolate* isolate, int length);
951 955
952 static Address SlotAddress(JavaScriptFrame* frame, int slot_index) { 956 static Address SlotAddress(JavaScriptFrame* frame, int slot_index) {
953 if (slot_index >= 0) { 957 if (slot_index >= 0) {
954 const int offset = JavaScriptFrameConstants::kLocal0Offset; 958 const int offset = JavaScriptFrameConstants::kLocal0OffsetOptimized;
955 return frame->fp() + offset - (slot_index * kPointerSize); 959 return frame->fp() + offset - (slot_index * kPointerSize);
956 } else { 960 } else {
957 const int offset = JavaScriptFrameConstants::kLastParameterOffset; 961 const int offset = JavaScriptFrameConstants::kLastParameterOffset;
958 return frame->fp() + offset - ((slot_index + 1) * kPointerSize); 962 return frame->fp() + offset - ((slot_index + 1) * kPointerSize);
959 } 963 }
960 } 964 }
961 965
962 Handle<Object> GetDeferredObject(Isolate* isolate); 966 Handle<Object> GetDeferredObject(Isolate* isolate);
963 }; 967 };
964 968
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 Object** parameters_; 1061 Object** parameters_;
1058 Object** expression_stack_; 1062 Object** expression_stack_;
1059 int source_position_; 1063 int source_position_;
1060 1064
1061 friend class Deoptimizer; 1065 friend class Deoptimizer;
1062 }; 1066 };
1063 1067
1064 } } // namespace v8::internal 1068 } } // namespace v8::internal
1065 1069
1066 #endif // V8_DEOPTIMIZER_H_ 1070 #endif // V8_DEOPTIMIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698