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

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

Issue 844006: Merge changes up to V8 version 2.1.3 into the partial snapshots (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 years, 9 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/arm/builtins-arm.cc ('k') | src/arm/codegen-arm.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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 void AddDeferred(DeferredCode* code) { deferred_.Add(code); } 196 void AddDeferred(DeferredCode* code) { deferred_.Add(code); }
197 197
198 static const int kUnknownIntValue = -1; 198 static const int kUnknownIntValue = -1;
199 199
200 private: 200 private:
201 // Construction/Destruction 201 // Construction/Destruction
202 explicit CodeGenerator(MacroAssembler* masm); 202 explicit CodeGenerator(MacroAssembler* masm);
203 203
204 // Accessors 204 // Accessors
205 inline bool is_eval(); 205 inline bool is_eval();
206 Scope* scope(); 206 inline Scope* scope();
207 207
208 // Generating deferred code. 208 // Generating deferred code.
209 void ProcessDeferred(); 209 void ProcessDeferred();
210 210
211 // State 211 // State
212 bool has_cc() const { return cc_reg_ != al; } 212 bool has_cc() const { return cc_reg_ != al; }
213 JumpTarget* true_target() const { return state_->true_target(); } 213 JumpTarget* true_target() const { return state_->true_target(); }
214 JumpTarget* false_target() const { return state_->false_target(); } 214 JumpTarget* false_target() const { return state_->false_target(); }
215 215
216 // We don't track loop nesting level on ARM yet. 216 // We don't track loop nesting level on ARM yet.
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 void GenerateArgumentsAccess(ZoneList<Expression*>* args); 363 void GenerateArgumentsAccess(ZoneList<Expression*>* args);
364 364
365 // Support for accessing the class and value fields of an object. 365 // Support for accessing the class and value fields of an object.
366 void GenerateClassOf(ZoneList<Expression*>* args); 366 void GenerateClassOf(ZoneList<Expression*>* args);
367 void GenerateValueOf(ZoneList<Expression*>* args); 367 void GenerateValueOf(ZoneList<Expression*>* args);
368 void GenerateSetValueOf(ZoneList<Expression*>* args); 368 void GenerateSetValueOf(ZoneList<Expression*>* args);
369 369
370 // Fast support for charCodeAt(n). 370 // Fast support for charCodeAt(n).
371 void GenerateFastCharCodeAt(ZoneList<Expression*>* args); 371 void GenerateFastCharCodeAt(ZoneList<Expression*>* args);
372 372
373 // Fast support for string.charAt(n) and string[n].
374 void GenerateCharFromCode(ZoneList<Expression*>* args);
375
373 // Fast support for object equality testing. 376 // Fast support for object equality testing.
374 void GenerateObjectEquals(ZoneList<Expression*>* args); 377 void GenerateObjectEquals(ZoneList<Expression*>* args);
375 378
376 void GenerateLog(ZoneList<Expression*>* args); 379 void GenerateLog(ZoneList<Expression*>* args);
377 380
378 // Fast support for Math.random(). 381 // Fast support for Math.random().
379 void GenerateRandomPositiveSmi(ZoneList<Expression*>* args); 382 void GenerateRandomPositiveSmi(ZoneList<Expression*>* args);
380 383
381 // Fast support for StringAdd. 384 // Fast support for StringAdd.
382 void GenerateStringAdd(ZoneList<Expression*>* args); 385 void GenerateStringAdd(ZoneList<Expression*>* args);
383 386
384 // Fast support for SubString. 387 // Fast support for SubString.
385 void GenerateSubString(ZoneList<Expression*>* args); 388 void GenerateSubString(ZoneList<Expression*>* args);
386 389
387 // Fast support for StringCompare. 390 // Fast support for StringCompare.
388 void GenerateStringCompare(ZoneList<Expression*>* args); 391 void GenerateStringCompare(ZoneList<Expression*>* args);
389 392
390 // Support for direct calls from JavaScript to native RegExp code. 393 // Support for direct calls from JavaScript to native RegExp code.
391 void GenerateRegExpExec(ZoneList<Expression*>* args); 394 void GenerateRegExpExec(ZoneList<Expression*>* args);
392 395
393 // Fast support for number to string. 396 // Fast support for number to string.
394 void GenerateNumberToString(ZoneList<Expression*>* args); 397 void GenerateNumberToString(ZoneList<Expression*>* args);
395 398
399 // Fast support for Math.pow().
400 void GenerateMathPow(ZoneList<Expression*>* args);
401
396 // Fast call to sine function. 402 // Fast call to sine function.
397 void GenerateMathSin(ZoneList<Expression*>* args); 403 void GenerateMathSin(ZoneList<Expression*>* args);
398 void GenerateMathCos(ZoneList<Expression*>* args); 404 void GenerateMathCos(ZoneList<Expression*>* args);
399 405
406 // Fast support for Math.pow().
407 void GenerateMathSqrt(ZoneList<Expression*>* args);
408
400 // Simple condition analysis. 409 // Simple condition analysis.
401 enum ConditionAnalysis { 410 enum ConditionAnalysis {
402 ALWAYS_TRUE, 411 ALWAYS_TRUE,
403 ALWAYS_FALSE, 412 ALWAYS_FALSE,
404 DONT_KNOW 413 DONT_KNOW
405 }; 414 };
406 ConditionAnalysis AnalyzeCondition(Expression* cond); 415 ConditionAnalysis AnalyzeCondition(Expression* cond);
407 416
408 // Methods used to indicate which source code is generated for. Source 417 // Methods used to indicate which source code is generated for. Source
409 // positions are collected by the assembler and emitted with the relocation 418 // positions are collected by the assembler and emitted with the relocation
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 void GenerateCopyCharactersLong(MacroAssembler* masm, 560 void GenerateCopyCharactersLong(MacroAssembler* masm,
552 Register dest, 561 Register dest,
553 Register src, 562 Register src,
554 Register count, 563 Register count,
555 Register scratch1, 564 Register scratch1,
556 Register scratch2, 565 Register scratch2,
557 Register scratch3, 566 Register scratch3,
558 Register scratch4, 567 Register scratch4,
559 Register scratch5, 568 Register scratch5,
560 int flags); 569 int flags);
570
571
572 // Probe the symbol table for a two character string. If the string is
573 // not found by probing a jump to the label not_found is performed. This jump
574 // does not guarantee that the string is not in the symbol table. If the
575 // string is found the code falls through with the string in register r0.
576 // Contents of both c1 and c2 registers are modified. At the exit c1 is
577 // guaranteed to contain halfword with low and high bytes equal to
578 // initial contents of c1 and c2 respectively.
579 void GenerateTwoCharacterSymbolTableProbe(MacroAssembler* masm,
580 Register c1,
581 Register c2,
582 Register scratch1,
583 Register scratch2,
584 Register scratch3,
585 Register scratch4,
586 Register scratch5,
587 Label* not_found);
588
589 // Generate string hash.
590 void GenerateHashInit(MacroAssembler* masm,
591 Register hash,
592 Register character);
593
594 void GenerateHashAddCharacter(MacroAssembler* masm,
595 Register hash,
596 Register character);
597
598 void GenerateHashGetHash(MacroAssembler* masm,
599 Register hash);
561 }; 600 };
562 601
563 602
564 // Flag that indicates how to generate code for the stub StringAddStub. 603 // Flag that indicates how to generate code for the stub StringAddStub.
565 enum StringAddFlags { 604 enum StringAddFlags {
566 NO_STRING_ADD_FLAGS = 0, 605 NO_STRING_ADD_FLAGS = 0,
567 NO_STRING_CHECK_IN_STUB = 1 << 0 // Omit string check in stub. 606 NO_STRING_CHECK_IN_STUB = 1 << 0 // Omit string check in stub.
568 }; 607 };
569 608
570 609
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 Major MajorKey() { return StringCompare; } 655 Major MajorKey() { return StringCompare; }
617 int MinorKey() { return 0; } 656 int MinorKey() { return 0; }
618 657
619 void Generate(MacroAssembler* masm); 658 void Generate(MacroAssembler* masm);
620 }; 659 };
621 660
622 661
623 } } // namespace v8::internal 662 } } // namespace v8::internal
624 663
625 #endif // V8_ARM_CODEGEN_ARM_H_ 664 #endif // V8_ARM_CODEGEN_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/arm/codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698