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

Side by Side Diff: src/x64/codegen-x64.h

Issue 3117006: Handle overwriting valueOf on String objects correctly when adding... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 4 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/runtime.js ('k') | src/x64/codegen-x64.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 340
341 void AddDeferred(DeferredCode* code) { deferred_.Add(code); } 341 void AddDeferred(DeferredCode* code) { deferred_.Add(code); }
342 342
343 bool in_spilled_code() const { return in_spilled_code_; } 343 bool in_spilled_code() const { return in_spilled_code_; }
344 void set_in_spilled_code(bool flag) { in_spilled_code_ = flag; } 344 void set_in_spilled_code(bool flag) { in_spilled_code_ = flag; }
345 345
346 // If the name is an inline runtime function call return the number of 346 // If the name is an inline runtime function call return the number of
347 // expected arguments. Otherwise return -1. 347 // expected arguments. Otherwise return -1.
348 static int InlineRuntimeCallArgumentsCount(Handle<String> name); 348 static int InlineRuntimeCallArgumentsCount(Handle<String> name);
349 349
350 static Operand ContextOperand(Register context, int index) {
351 return Operand(context, Context::SlotOffset(index));
352 }
353
350 private: 354 private:
351 // Construction/Destruction 355 // Construction/Destruction
352 explicit CodeGenerator(MacroAssembler* masm); 356 explicit CodeGenerator(MacroAssembler* masm);
353 357
354 // Accessors 358 // Accessors
355 inline bool is_eval(); 359 inline bool is_eval();
356 inline Scope* scope(); 360 inline Scope* scope();
357 361
358 // Generating deferred code. 362 // Generating deferred code.
359 void ProcessDeferred(); 363 void ProcessDeferred();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 // Returns the arguments allocation mode. 403 // Returns the arguments allocation mode.
400 ArgumentsAllocationMode ArgumentsMode(); 404 ArgumentsAllocationMode ArgumentsMode();
401 405
402 // Store the arguments object and allocate it if necessary. 406 // Store the arguments object and allocate it if necessary.
403 Result StoreArgumentsObject(bool initial); 407 Result StoreArgumentsObject(bool initial);
404 408
405 // The following are used by class Reference. 409 // The following are used by class Reference.
406 void LoadReference(Reference* ref); 410 void LoadReference(Reference* ref);
407 void UnloadReference(Reference* ref); 411 void UnloadReference(Reference* ref);
408 412
409 static Operand ContextOperand(Register context, int index) {
410 return Operand(context, Context::SlotOffset(index));
411 }
412
413 Operand SlotOperand(Slot* slot, Register tmp); 413 Operand SlotOperand(Slot* slot, Register tmp);
414 414
415 Operand ContextSlotOperandCheckExtensions(Slot* slot, 415 Operand ContextSlotOperandCheckExtensions(Slot* slot,
416 Result tmp, 416 Result tmp,
417 JumpTarget* slow); 417 JumpTarget* slow);
418 418
419 // Expressions 419 // Expressions
420 static Operand GlobalObject() { 420 static Operand GlobalObject() {
421 return ContextOperand(rsi, Context::GLOBAL_INDEX); 421 return ContextOperand(rsi, Context::GLOBAL_INDEX);
422 } 422 }
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 604
605 // Support for type checks. 605 // Support for type checks.
606 void GenerateIsSmi(ZoneList<Expression*>* args); 606 void GenerateIsSmi(ZoneList<Expression*>* args);
607 void GenerateIsNonNegativeSmi(ZoneList<Expression*>* args); 607 void GenerateIsNonNegativeSmi(ZoneList<Expression*>* args);
608 void GenerateIsArray(ZoneList<Expression*>* args); 608 void GenerateIsArray(ZoneList<Expression*>* args);
609 void GenerateIsRegExp(ZoneList<Expression*>* args); 609 void GenerateIsRegExp(ZoneList<Expression*>* args);
610 void GenerateIsObject(ZoneList<Expression*>* args); 610 void GenerateIsObject(ZoneList<Expression*>* args);
611 void GenerateIsSpecObject(ZoneList<Expression*>* args); 611 void GenerateIsSpecObject(ZoneList<Expression*>* args);
612 void GenerateIsFunction(ZoneList<Expression*>* args); 612 void GenerateIsFunction(ZoneList<Expression*>* args);
613 void GenerateIsUndetectableObject(ZoneList<Expression*>* args); 613 void GenerateIsUndetectableObject(ZoneList<Expression*>* args);
614 void GenerateIsStringWrapperSafeForDefaultValueOf(
615 ZoneList<Expression*>* args);
614 616
615 // Support for construct call checks. 617 // Support for construct call checks.
616 void GenerateIsConstructCall(ZoneList<Expression*>* args); 618 void GenerateIsConstructCall(ZoneList<Expression*>* args);
617 619
618 // Support for arguments.length and arguments[?]. 620 // Support for arguments.length and arguments[?].
619 void GenerateArgumentsLength(ZoneList<Expression*>* args); 621 void GenerateArgumentsLength(ZoneList<Expression*>* args);
620 void GenerateArguments(ZoneList<Expression*>* args); 622 void GenerateArguments(ZoneList<Expression*>* args);
621 623
622 // Support for accessing the class and value fields of an object. 624 // Support for accessing the class and value fields of an object.
623 void GenerateClassOf(ZoneList<Expression*>* args); 625 void GenerateClassOf(ZoneList<Expression*>* args);
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 return ObjectBits::encode(object_.code()) | 1085 return ObjectBits::encode(object_.code()) |
1084 AddressBits::encode(addr_.code()) | 1086 AddressBits::encode(addr_.code()) |
1085 ScratchBits::encode(scratch_.code()); 1087 ScratchBits::encode(scratch_.code());
1086 } 1088 }
1087 }; 1089 };
1088 1090
1089 1091
1090 } } // namespace v8::internal 1092 } } // namespace v8::internal
1091 1093
1092 #endif // V8_X64_CODEGEN_X64_H_ 1094 #endif // V8_X64_CODEGEN_X64_H_
OLDNEW
« no previous file with comments | « src/runtime.js ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698