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

Side by Side Diff: src/mips/full-codegen-mips.cc

Issue 526223002: Use Chrome compatible naming for compiler specifics. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: mips Created 6 years, 3 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/lookup.h ('k') | src/mips/lithium-codegen-mips.h » ('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 // 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1959 } 1959 }
1960 1960
1961 1961
1962 void FullCodeGenerator::VisitYield(Yield* expr) { 1962 void FullCodeGenerator::VisitYield(Yield* expr) {
1963 Comment cmnt(masm_, "[ Yield"); 1963 Comment cmnt(masm_, "[ Yield");
1964 // Evaluate yielded value first; the initial iterator definition depends on 1964 // Evaluate yielded value first; the initial iterator definition depends on
1965 // this. It stays on the stack while we update the iterator. 1965 // this. It stays on the stack while we update the iterator.
1966 VisitForStackValue(expr->expression()); 1966 VisitForStackValue(expr->expression());
1967 1967
1968 switch (expr->yield_kind()) { 1968 switch (expr->yield_kind()) {
1969 case Yield::SUSPEND: 1969 case Yield::kSuspend:
1970 // Pop value from top-of-stack slot; box result into result register. 1970 // Pop value from top-of-stack slot; box result into result register.
1971 EmitCreateIteratorResult(false); 1971 EmitCreateIteratorResult(false);
1972 __ push(result_register()); 1972 __ push(result_register());
1973 // Fall through. 1973 // Fall through.
1974 case Yield::INITIAL: { 1974 case Yield::kInitial: {
1975 Label suspend, continuation, post_runtime, resume; 1975 Label suspend, continuation, post_runtime, resume;
1976 1976
1977 __ jmp(&suspend); 1977 __ jmp(&suspend);
1978 1978
1979 __ bind(&continuation); 1979 __ bind(&continuation);
1980 __ jmp(&resume); 1980 __ jmp(&resume);
1981 1981
1982 __ bind(&suspend); 1982 __ bind(&suspend);
1983 VisitForAccumulatorValue(expr->generator_object()); 1983 VisitForAccumulatorValue(expr->generator_object());
1984 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos())); 1984 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos()));
(...skipping 10 matching lines...) Expand all
1995 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 1995 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
1996 __ bind(&post_runtime); 1996 __ bind(&post_runtime);
1997 __ pop(result_register()); 1997 __ pop(result_register());
1998 EmitReturnSequence(); 1998 EmitReturnSequence();
1999 1999
2000 __ bind(&resume); 2000 __ bind(&resume);
2001 context()->Plug(result_register()); 2001 context()->Plug(result_register());
2002 break; 2002 break;
2003 } 2003 }
2004 2004
2005 case Yield::FINAL: { 2005 case Yield::kFinal: {
2006 VisitForAccumulatorValue(expr->generator_object()); 2006 VisitForAccumulatorValue(expr->generator_object());
2007 __ li(a1, Operand(Smi::FromInt(JSGeneratorObject::kGeneratorClosed))); 2007 __ li(a1, Operand(Smi::FromInt(JSGeneratorObject::kGeneratorClosed)));
2008 __ sw(a1, FieldMemOperand(result_register(), 2008 __ sw(a1, FieldMemOperand(result_register(),
2009 JSGeneratorObject::kContinuationOffset)); 2009 JSGeneratorObject::kContinuationOffset));
2010 // Pop value from top-of-stack slot, box result into result register. 2010 // Pop value from top-of-stack slot, box result into result register.
2011 EmitCreateIteratorResult(true); 2011 EmitCreateIteratorResult(true);
2012 EmitUnwindBeforeReturn(); 2012 EmitUnwindBeforeReturn();
2013 EmitReturnSequence(); 2013 EmitReturnSequence();
2014 break; 2014 break;
2015 } 2015 }
2016 2016
2017 case Yield::DELEGATING: { 2017 case Yield::kDelegating: {
2018 VisitForStackValue(expr->generator_object()); 2018 VisitForStackValue(expr->generator_object());
2019 2019
2020 // Initial stack layout is as follows: 2020 // Initial stack layout is as follows:
2021 // [sp + 1 * kPointerSize] iter 2021 // [sp + 1 * kPointerSize] iter
2022 // [sp + 0 * kPointerSize] g 2022 // [sp + 0 * kPointerSize] g
2023 2023
2024 Label l_catch, l_try, l_suspend, l_continuation, l_resume; 2024 Label l_catch, l_try, l_suspend, l_continuation, l_resume;
2025 Label l_next, l_call; 2025 Label l_next, l_call;
2026 Register load_receiver = LoadConvention::ReceiverRegister(); 2026 Register load_receiver = LoadConvention::ReceiverRegister();
2027 Register load_name = LoadConvention::NameRegister(); 2027 Register load_name = LoadConvention::NameRegister();
(...skipping 2851 matching lines...) Expand 10 before | Expand all | Expand 10 after
4879 Assembler::target_address_at(pc_immediate_load_address)) == 4879 Assembler::target_address_at(pc_immediate_load_address)) ==
4880 reinterpret_cast<uint32_t>( 4880 reinterpret_cast<uint32_t>(
4881 isolate->builtins()->OsrAfterStackCheck()->entry())); 4881 isolate->builtins()->OsrAfterStackCheck()->entry()));
4882 return OSR_AFTER_STACK_CHECK; 4882 return OSR_AFTER_STACK_CHECK;
4883 } 4883 }
4884 4884
4885 4885
4886 } } // namespace v8::internal 4886 } } // namespace v8::internal
4887 4887
4888 #endif // V8_TARGET_ARCH_MIPS 4888 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/lookup.h ('k') | src/mips/lithium-codegen-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698